Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
23
Task/Date-format/REBOL/date-format.rebol
Normal file
23
Task/Date-format/REBOL/date-format.rebol
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
REBOL [
|
||||
Title: "Date Formatting"
|
||||
URL: http://rosettacode.org/wiki/Date_format
|
||||
]
|
||||
|
||||
; REBOL has no built-in pictured output.
|
||||
|
||||
zeropad: func [pad n][
|
||||
n: to-string n
|
||||
insert/dup n "0" (pad - length? n)
|
||||
n
|
||||
]
|
||||
d02: func [n][zeropad 2 n]
|
||||
|
||||
print now ; Native formatting.
|
||||
|
||||
print rejoin [now/year "-" d02 now/month "-" d02 now/day]
|
||||
|
||||
print rejoin [
|
||||
pick system/locale/days now/weekday ", "
|
||||
pick system/locale/months now/month " "
|
||||
now/day ", " now/year
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue