Document language for dates; @eval pathname resolution and :cwd (from dev bc7cd62b6f68)
@date/@datetime gain :lang (German: "16. Juni 1910") over a document-wide Language state variable, and :number for the numeric form (en 6/16/1910, de 16.06.1910 per DIN 5008). @eval finds Python modules next to the file that names them regardless of the cwd, and the new :cwd option runs an eval in a chosen working directory (@source_file uses it to resolve against the document). Two new test suites ship in tst/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
@@date.k :days.int 0 :
|
||||
Date formatted as "16 June 1910", offset by ^:days days from today
|
||||
(^:days 1 is tomorrow, ^:days -1 is yesterday)
|
||||
@@date.k :days.int 0 :lang.language :number.bool false :
|
||||
Date formatted as "16 June 1910" (^:lang de: "16. Juni 1910"), offset by
|
||||
^:days days from today (^:days 1 is tomorrow, ^:days -1 is yesterday).
|
||||
^:lang selects the language of the month name and the date form; without
|
||||
it the document-wide Language state variable applies (default en).
|
||||
^:number true gives the numeric form, which is language-specific in
|
||||
order, separator, and padding: "6/16/1910" (en, month first),
|
||||
"16.06.1910" (de, day first, zero-padded per DIN 5008)
|
||||
@@
|
||||
@@date.html :: @eval date.date(K) eval@ @@
|
||||
@@date.tex :: @eval date.date(K) eval@ @@
|
||||
@@date.txt :: @eval date.date(K) eval@ @@
|
||||
|
||||
@@datetime.k :days.int 0 :
|
||||
Date and time formatted as "16 June 1910, 13:10", offset by ^:days days
|
||||
from today (^:days 1 is tomorrow, ^:days -1 is yesterday)
|
||||
@@datetime.k :days.int 0 :lang.language :number.bool false :
|
||||
Date and time formatted as "16 June 1910, 13:10" (^:lang de:
|
||||
"16. Juni 1910, 13:10"), offset by ^:days days from today (^:days 1 is
|
||||
tomorrow, ^:days -1 is yesterday). ^:lang and ^:number select the
|
||||
language and the numeric form as for ^@date
|
||||
@@
|
||||
@@datetime.html :: @eval date.datetime(K) eval@ @@
|
||||
@@datetime.tex :: @eval date.datetime(K) eval@ @@
|
||||
|
||||
Reference in New Issue
Block a user