Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,4 @@
d:new
"%Y-%M-%D" over d:format . cr
"%W, %N %D, %Y" over d:format . cr
bye

View file

@ -0,0 +1,5 @@
Datetime dtNow = datetime.now();
String strDt1 = dtNow.format('yyyy-MM-dd');
String strDt2 = dtNow.format('EEEE, MMMM dd, yyyy');
system.debug(strDt1); // "2007-11-10"
system.debug(strDt2); //"Sunday, November 10, 2007"

View file

@ -0,0 +1,10 @@
' FB 1.05.0 Win64
#Include "vbcompat.bi"
Dim d As Long = Now
Print "This example was created on : "; Format(d, "yyyy-mm-dd")
Print "In other words on : "; Format(d, "dddd, mmmm d, yyyy")
Print
Print "Press any key to quit the program"
Sleep

View file

@ -0,0 +1,2 @@
println( format('%tF', $date) )
println( format('%1$tA, %1$tB %1$td, %1$tY', $date) )

View file

@ -0,0 +1,2 @@
date('11/10/2007')->format('%Q') // 2007-11-10
date('11/10/2007')->format('EEEE, MMMM d, YYYY') //Saturday, November 10, 2007

View file

@ -0,0 +1,5 @@
import times
var t = getTime().getLocalTime()
echo(t.format("yyyy-MM-dd"))
echo(t.format("dddd',' MMMM d',' yyyy"))

View file

@ -0,0 +1,3 @@
include builtins\timedate.e
?format_timedate(date(),"YYYY-MM-DD")
?format_timedate(date(),"Dddd, Mmmm d, YYYY")

View file

@ -0,0 +1,26 @@
dt = list(21)
dt[1] = "abbreviated weekday name"
dt[2] = "full weekday name"
dt[3] = "abbreviated month name"
dt[4] = "full month name"
dt[5] = "Date & Time"
dt[6] = "Day of the month"
dt[7] = "Hour (24)"
dt[8] = "Hour (12)"
dt[9] = "Day of the year"
dt[10] = "Month of the year"
dt[11] = "Minutes after hour"
dt[12] = "AM or PM"
dt[13] = "Seconds after the hour"
dt[14] = "Week of the year (sun-sat)"
dt[15] = "day of the week"
dt[16] = "date"
dt[17] = "time"
dt[18] = "year of the century"
dt[19] = "year"
dt[20] = "time zone"
dt[21] = "percent sign"
for i=1 to 21
see dt[i] + " : " + TimeList () [i] + nl
next

View file

@ -0,0 +1,4 @@
var time = Time.local;
say time.ctime;
say time.strftime("%Y-%m-%d");
say time.strftime("%A, %B %d, %Y");

View file

@ -0,0 +1,11 @@
import Foundation
extension String {
func toStandardDateWithDateFormat(format: String) -> String {
let dateFormatter = NSDateFormatter()
dateFormatter.dateFormat = format
dateFormatter.dateStyle = .LongStyle
return dateFormatter.stringFromDate(dateFormatter.dateFromString(self)!)
}
}
let date = "2015-08-28".toStandardDateWithDateFormat("yyyy-MM-dd")

View file

@ -0,0 +1,13 @@
cygnus/x ursa v0.78 (default, release 0)
[Oracle Corporation JVM 1.8.0_51 on Mac OS X 10.10.5 x86_64]
> import "java.util.Date"
> import "java.text.SimpleDateFormat"
> decl java.text.SimpleDateFormat sdf
> sdf.applyPattern "yyyy-MM-dd"
> decl java.util.Date d
> out (sdf.format d) endl console
2016-07-23
> sdf.applyPattern "EEEE, MMMM dd, yyyy"
> out (sdf.format d) endl console
Saturday, July 23, 2016
> _

View file

@ -0,0 +1,3 @@
$ jq -n 'now | (strftime("%Y-%m-%d"), strftime("%A, %B %d, %Y"))'
"2015-07-02"
"Thursday, July 02, 2015"