September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import extensions.
|
||||
import extensions;
|
||||
import system'calendar;
|
||||
|
||||
program =
|
||||
[
|
||||
console printLine(system'calendar'Date now).
|
||||
].
|
||||
public program()
|
||||
{
|
||||
console.printLine(Date.Now);
|
||||
}
|
||||
|
|
|
|||
13
Task/System-time/Neko/system-time.neko
Normal file
13
Task/System-time/Neko/system-time.neko
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/**
|
||||
<doc>
|
||||
<h2>System time</h2>
|
||||
<p>Neko uses Int32 to store system date/time values.
|
||||
And lib C strftime style formatting for converting to string form</p>
|
||||
</doc>
|
||||
*/
|
||||
|
||||
var date_now = $loader.loadprim("std@date_now", 0)
|
||||
var date_format = $loader.loadprim("std@date_format", 2)
|
||||
|
||||
var now = date_now()
|
||||
$print(now, " ", date_format(now, "%T"), "\n")
|
||||
|
|
@ -1,14 +1,46 @@
|
|||
say time() /* hh:mm:ss (hh is 00 --> 23). */
|
||||
say time('n') /* (same as above) */
|
||||
say time('N') /* (same as above) */
|
||||
say time('Normal') /* (same as above) */
|
||||
say time('nitPick') /* (same as above) */
|
||||
/*REXX program shows various ways to display the system time, including other options. */
|
||||
|
||||
say time('C') /* hh:mmam or hh:mmpm (hh is 0 --> 12). */
|
||||
say time('Civil') /* (same as above) */
|
||||
say '════════════ Normal format of time'
|
||||
say 'hh:mm:ss ◄─────────────── hh= is 00 ──► 23'
|
||||
say 'hh:mm:ss ◄─────────────── hh= hour mm= minute ss= second'
|
||||
say time()
|
||||
say time('n') /* (same as the previous example.) */
|
||||
say time('N') /* " " " " " */
|
||||
say time('Normal') /* " " " " " */
|
||||
say time('nitPick') /* " " " " " */
|
||||
|
||||
say time('L') /* hh:mm:ss.ffffff (hh is 0 ---> 23). */
|
||||
say time('Long') /* (same as above) */
|
||||
say
|
||||
say '════════════ Civil format of time'
|
||||
say 'hh:mmcc ◄─────────────── hh= is 1 ──► 12'
|
||||
say 'hh:mmam ◄─────────────── hh= hour mm= minute am= ante meridiem'
|
||||
say 'hh:mmpm ◄─────────────── pm= post meridiem'
|
||||
say time('C')
|
||||
say time('civil') /* (same as the previous example.) */
|
||||
/*ante meridiem≡Latin for before midday*/
|
||||
/*post " " " after " */
|
||||
say
|
||||
say '════════════ long format of time'
|
||||
say 'hh:mm:ss ◄─────────────── hh= is 0 ──► 23'
|
||||
say 'hh:mm:ss.ffffff ◄─────────────── hh= hour mm= minute fffff= fractional seconds'
|
||||
say time('L')
|
||||
say time('long') /* (same as the previous example.) */
|
||||
say time('long time no see') /* " " " " " */
|
||||
|
||||
say time('S') /* sssss (0 ---> 86399). */
|
||||
say time('Seconds') /*number of complete seconds since midnight.*/
|
||||
say
|
||||
say '════════════ complete hours since midnight'
|
||||
say 'hh ◄─────────────── hh = 0 ───► 23'
|
||||
say time('H')
|
||||
say time('hours') /* (same as the previous example.) */
|
||||
|
||||
say
|
||||
say '════════════ complete minutes since midnight'
|
||||
say 'mmmm ◄─────────────── mmmm = 0 ───► 1439'
|
||||
say time('M')
|
||||
say time('minutes') /* (same as the previous example.) */
|
||||
|
||||
say
|
||||
say '════════════ complete seconds since midnight'
|
||||
say 'sssss ◄─────────────── sssss = 0 ───► 86399'
|
||||
say time('S')
|
||||
say time('seconds') /* (same as the previous example.) */
|
||||
/*stick a fork in it, we're all done. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue