September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -7,7 +7,10 @@ Output the system '''time''' (any units will do as long as they are noted
|
|||
The system time can be used for debugging, network information, random number seeds, or something as simple as program performance.
|
||||
|
||||
|
||||
;See also:
|
||||
;Related task:
|
||||
* [[Date format]]
|
||||
|
||||
|
||||
;See also:
|
||||
* [[wp:System time#Retrieving system time|Retrieving system time (wiki)]]
|
||||
<br><br>
|
||||
|
|
|
|||
5
Task/System-time/BaCon/system-time.bacon
Normal file
5
Task/System-time/BaCon/system-time.bacon
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
' BaCon time
|
||||
n = NOW
|
||||
PRINT n, " seconds since January 1st, 1970"
|
||||
PRINT YEAR(n), MONTH(n), DAY(n) FORMAT "%04d/%02d/%02d "
|
||||
PRINT HOUR(n), MINUTE(n), SECOND(n) FORMAT "%02d:%02d:%02d\n"
|
||||
11
Task/System-time/ColdFusion/system-time.cfm
Normal file
11
Task/System-time/ColdFusion/system-time.cfm
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<cfscript>
|
||||
// Date Time
|
||||
currentTime = Now();
|
||||
writeOutput( currentTime );
|
||||
|
||||
// Epoch
|
||||
// Credit for Epoch time should go to Ben Nadel
|
||||
// bennadel.com is his blog
|
||||
utcDate = dateConvert( "local2utc", currentTime );
|
||||
writeOutput( utcDate.getTime() );
|
||||
</cfscript>
|
||||
|
|
@ -1 +0,0 @@
|
|||
=NOW()
|
||||
|
|
@ -1 +0,0 @@
|
|||
9-8-2013 17:33
|
||||
5
Task/System-time/Gambas/system-time.gambas
Normal file
5
Task/System-time/Gambas/system-time.gambas
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Public Sub Main()
|
||||
|
||||
Print Format(Now, "dddd dd mmmm yyyy hh:nn:ss")
|
||||
|
||||
End
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
import System.Time
|
||||
import System.Locale
|
||||
(getClockTime, toCalendarTime, formatCalendarTime)
|
||||
|
||||
main = do ct <- getClockTime
|
||||
print ct -- print default format, or
|
||||
cal <- toCalendarTime ct
|
||||
putStrLn $ formatCalendarTime defaultTimeLocale "%a %b %e %H:%M:%S %Y" cal
|
||||
import System.Locale (defaultTimeLocale)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
ct <- getClockTime
|
||||
print ct -- print default format, or
|
||||
cal <- toCalendarTime ct
|
||||
putStrLn $ formatCalendarTime defaultTimeLocale "%a %b %e %H:%M:%S %Y" cal
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import Data.Time
|
||||
import System.Locale
|
||||
import Data.Time (getZonedTime, formatTime, defaultTimeLocale)
|
||||
|
||||
main = do zt <- getZonedTime
|
||||
print zt -- print default format, or
|
||||
putStrLn $ formatTime defaultTimeLocale "%a %b %e %H:%M:%S %Y" zt
|
||||
main :: IO ()
|
||||
main = do
|
||||
zt <- getZonedTime
|
||||
print zt -- print default format, or
|
||||
putStrLn $ formatTime defaultTimeLocale "%a %b %e %H:%M:%S %Y" zt
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Date now println
|
||||
|
|
@ -1 +0,0 @@
|
|||
2008-08-26 00:15:52 EDT
|
||||
5
Task/System-time/Kotlin/system-time.kotlin
Normal file
5
Task/System-time/Kotlin/system-time.kotlin
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// version 1.0.6
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println("%tc".format(System.currentTimeMillis()))
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
import times
|
||||
|
||||
echo(getDateStr())
|
||||
echo(getClockStr())
|
||||
echo(getTime())
|
||||
5
Task/System-time/SPL/system-time.spl
Normal file
5
Task/System-time/SPL/system-time.spl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
hour,min,sec = #.now()
|
||||
day,month,year = #.today()
|
||||
|
||||
#.output(#.str(hour,"00:"),#.str(min,"00:"),#.str(sec,"00.000"))
|
||||
#.output(day,".",#.str(month,"00"),".",year)
|
||||
1
Task/System-time/VBScript/system-time.vb
Normal file
1
Task/System-time/VBScript/system-time.vb
Normal file
|
|
@ -0,0 +1 @@
|
|||
WScript.Echo Now
|
||||
1
Task/System-time/Zkl/system-time.zkl
Normal file
1
Task/System-time/Zkl/system-time.zkl
Normal file
|
|
@ -0,0 +1 @@
|
|||
Time.Clock.time //-->seconds since the epoch (C/OS defined)
|
||||
Loading…
Add table
Add a link
Reference in a new issue