Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
4
Task/System-time/FreeBASIC/system-time.freebasic
Normal file
4
Task/System-time/FreeBASIC/system-time.freebasic
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
Print Date + " " + Time '' returns system date/time in format : mm-dd-yyyy hh:mm:ss
|
||||
Sleep
|
||||
1
Task/System-time/Hoon/system-time.hoon
Normal file
1
Task/System-time/Hoon/system-time.hoon
Normal file
|
|
@ -0,0 +1 @@
|
|||
now
|
||||
2
Task/System-time/LFE/system-time-1.lfe
Normal file
2
Task/System-time/LFE/system-time-1.lfe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
> (os:timestamp)
|
||||
#(1423 786308 145798)
|
||||
2
Task/System-time/LFE/system-time-2.lfe
Normal file
2
Task/System-time/LFE/system-time-2.lfe
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
> (calendar:now_to_datetime (os:timestamp))
|
||||
#(#(2015 2 13) #(0 12 18))
|
||||
4
Task/System-time/LFE/system-time-3.lfe
Normal file
4
Task/System-time/LFE/system-time-3.lfe
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
> (calendar:now_to_universal_time (os:timestamp))
|
||||
#(#(2015 2 13) #(0 13 51))
|
||||
> (calendar:now_to_local_time (os:timestamp))
|
||||
#(#(2015 2 12) #(16 14 26))
|
||||
2
Task/System-time/Lasso/system-time.lasso
Normal file
2
Task/System-time/Lasso/system-time.lasso
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
date->format('%Q %T')
|
||||
date->asInteger
|
||||
15
Task/System-time/Lingo/system-time.lingo
Normal file
15
Task/System-time/Lingo/system-time.lingo
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
put time()
|
||||
-- "03:45"
|
||||
|
||||
put date()
|
||||
-- "01.10.2016"
|
||||
|
||||
put the systemdate
|
||||
-- date( 2016, 10, 1 )
|
||||
|
||||
put the systemdate.seconds
|
||||
-- 13950
|
||||
|
||||
-- milliseconds since last boot, due to higher resolution better suited for random number seeding
|
||||
put _system.milliseconds
|
||||
-- 41746442
|
||||
1
Task/System-time/LiveCode/system-time.livecode
Normal file
1
Task/System-time/LiveCode/system-time.livecode
Normal file
|
|
@ -0,0 +1 @@
|
|||
put the system time
|
||||
5
Task/System-time/Nim/system-time.nim
Normal file
5
Task/System-time/Nim/system-time.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import times
|
||||
|
||||
echo(getDateStr())
|
||||
echo(getClockStr())
|
||||
echo(getTime())
|
||||
2
Task/System-time/Oforth/system-time-1.oforth
Normal file
2
Task/System-time/Oforth/system-time-1.oforth
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
System.tick println
|
||||
#[ #sqrt 1000000 seq map sum println ] bench
|
||||
3
Task/System-time/Oforth/system-time-2.oforth
Normal file
3
Task/System-time/Oforth/system-time-2.oforth
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import: date
|
||||
|
||||
System.localTime dup println asDate println drop drop
|
||||
6
Task/System-time/Phix/system-time.phix
Normal file
6
Task/System-time/Phix/system-time.phix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
include timedate.e
|
||||
?format_timedate(date(),"Dddd, Mmmm dth, YYYY, h:mm:ss pm")
|
||||
|
||||
atom t0 = time()
|
||||
sleep(0.9)
|
||||
?time()-t0
|
||||
25
Task/System-time/Ring/system-time.ring
Normal file
25
Task/System-time/Ring/system-time.ring
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* Output:
|
||||
** Sun abbreviated weekday name
|
||||
** Sunday full weekday name
|
||||
** May abbreviated month name
|
||||
** May full month name
|
||||
** 05/24/15 09:58:38 Date & Time
|
||||
** 24 Day of the month
|
||||
** 09 Hour (24)
|
||||
** 09 Hour (12)
|
||||
** 144 Day of the year
|
||||
** 05 Month of the year
|
||||
** 58 Minutes after hour
|
||||
** AM AM or PM
|
||||
** 38 Seconds after the hour
|
||||
** 21 Week of the year (sun-sat)
|
||||
** 0 day of the week
|
||||
** 05/24/15 date
|
||||
** 09:58:38 time
|
||||
** 15 year of the century
|
||||
** 2015 year
|
||||
** Arab Standard Time time zone
|
||||
** % percent sign
|
||||
*/
|
||||
|
||||
See TimeList()
|
||||
8
Task/System-time/Sidef/system-time.sidef
Normal file
8
Task/System-time/Sidef/system-time.sidef
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# textual
|
||||
say Time.local.ctime; # => Thu Mar 19 15:10:41 2015
|
||||
|
||||
# epoch time
|
||||
say Time.sec; # => 1426770641
|
||||
|
||||
# epoch time with fractional seconds
|
||||
say Time.micro_sec; # => 1426770641.68409
|
||||
4
Task/System-time/Swift/system-time.swift
Normal file
4
Task/System-time/Swift/system-time.swift
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import Foundation
|
||||
|
||||
var ⌚️ = NSDate()
|
||||
println(⌚️)
|
||||
3
Task/System-time/Ursa/system-time.ursa
Normal file
3
Task/System-time/Ursa/system-time.ursa
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# outputs time in milliseconds
|
||||
import "time"
|
||||
out (time.getcurrent) endl console
|
||||
5
Task/System-time/jq/system-time.jq
Normal file
5
Task/System-time/jq/system-time.jq
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
$ jq -n 'now | [., todate]'
|
||||
[
|
||||
1437619000.970498,
|
||||
"2015-07-23T02:36:40Z"
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue