-
Notifications
You must be signed in to change notification settings - Fork 1
/
date-to-iso.fs
36 lines (28 loc) · 949 Bytes
/
date-to-iso.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
\ galope/date-to-iso.fs
\ This file is part of Galope
\ http:https://programandala.net/en.program.galope.html
\ Author: Marcos Cruz (programandala.net), 2014, 2017, 2018.
\ ==============================================================
require ./iso-8601.fs
require ./time-to-d.fs
: date>iso ( +n1 +n2 n3 -- ca len )
time>d <# # # iso-8601-hyphen # # iso-8601-hyphen # # # # #> ;
\ doc{
\
\ date>iso ( +n1 +n2 n3 -- ca len )
\
\ Convert day _+n1_, month _+n2_ and year _n3_ into ISO date _ca
\ len_.
\
\ The format can be configured by `extended-iso-8601`.
\
\ See: `extended-iso-8601`, `time>iso`, `time&date>iso`, `time>d`,
\ `iso-8601-hyphen`, `iso-date>extended`.
\
\ }doc
\ ==============================================================
\ Change log
\ 2017-11-13: Extract from <time-and-date-to-iso.fs>, fix (add
\ leading zeroes) improve (make configurable) and document.
\
\ 2018-07-22: Improve documentation.