diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-28 13:53:15 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-28 13:53:15 -0400 |
| commit | 9c302fdc34403f46572d9524309617888ba816bb (patch) | |
| tree | 58ea7faf390536503de114cf2889ed85ba60df7b /environment.c | |
| parent | c632a72486d347e7ef30c0b7890e2045ed42b903 (diff) | |
| parent | ce2aebe91085f987aab31bd2a49820fb605cf386 (diff) | |
Merge branch 'main' into internal-textsinternal-texts
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/environment.c b/environment.c index 2607ab95..c980bd16 100644 --- a/environment.c +++ b/environment.c @@ -267,19 +267,27 @@ env_t *new_compilation_unit(CORD libname) {"after", "DateTime$after", "func(dt:DateTime,seconds,minutes,hours=0.0,days,weeks,months,years=0,timezone=!Text -> DateTime)"}, {"date", "DateTime$date", "func(dt:DateTime,timezone=!Text -> Text)"}, + {"day_of_month", "DateTime$day_of_month", "func(dt:DateTime,timezone=!Text -> Int)"}, + {"day_of_week", "DateTime$day_of_week", "func(dt:DateTime,timezone=!Text -> Int)"}, + {"day_of_year", "DateTime$day_of_year", "func(dt:DateTime,timezone=!Text -> Int)"}, {"format", "DateTime$format", "func(dt:DateTime,format=\"%Y-%m-%dT%H:%M:%S%z\",timezone=!Text -> Text)"}, {"from_unix_timestamp", "DateTime$from_unix_timestamp", "func(timestamp:Int64 -> DateTime)"}, - {"get", "DateTime$get", "func(dt:DateTime,year,month,day,hour,minute,second,nanosecond,weekday=!&Int,timezone=!Text)"}, {"get_local_timezone", "DateTime$get_local_timezone", "func(->Text)"}, + {"hour", "DateTime$hour", "func(dt:DateTime,timezone=!Text -> Int)"}, {"hours_till", "DateTime$hours_till", "func(now,then:DateTime -> Num)"}, + {"minute", "DateTime$minute", "func(dt:DateTime,timezone=!Text -> Int)"}, {"minutes_till", "DateTime$minutes_till", "func(now,then:DateTime -> Num)"}, + {"month", "DateTime$month", "func(dt:DateTime,timezone=!Text -> Int)"}, + {"nanosecond", "DateTime$nanosecond", "func(dt:DateTime,timezone=!Text -> Int)"}, {"new", "DateTime$new", "func(year,month,day:Int,hour,minute=0,second=0.0,timezone=!Text -> DateTime)"}, {"parse", "DateTime$parse", "func(text:Text, format=\"%Y-%m-%dT%H:%M:%S%z\" -> DateTime?)"}, {"relative", "DateTime$relative", "func(dt:DateTime,relative_to=DateTime.now(),timezone=!Text -> Text)"}, + {"second", "DateTime$second", "func(dt:DateTime,timezone=!Text -> Int)"}, {"seconds_till", "DateTime$seconds_till", "func(now:DateTime,then:DateTime -> Num)"}, {"set_local_timezone", "DateTime$set_local_timezone", "func(timezone=!Text)"}, {"time", "DateTime$time", "func(dt:DateTime,seconds=no,am_pm=yes,timezone=!Text -> Text)"}, {"unix_timestamp", "DateTime$unix_timestamp", "func(dt:DateTime -> Int64)"}, + {"year", "DateTime$year", "func(dt:DateTime,timezone=!Text -> Int)"}, )}, {"Path", Type(TextType, .lang="Path", .env=namespace_env(env, "Path")), "Text_t", "Text$info", TypedArray(ns_entry_t, {"append", "Path$append", "func(path:Path, text:Text, permissions=0o644[32])"}, @@ -336,7 +344,7 @@ env_t *new_compilation_unit(CORD libname) {"as_c_string", "Text$as_c_string", "func(text:Text -> CString)"}, {"codepoint_names", "Text$codepoint_names", "func(text:Text -> [Text])"}, {"ends_with", "Text$ends_with", "func(text,suffix:Text -> Bool)"}, - {"find", "Text$find", "func(text:Text, pattern:Pattern, start=1, length=!&Int64 -> Int)"}, + {"find", "Text$find", "func(text:Text, pattern:Pattern, start=1 -> Int)"}, {"find_all", "Text$find_all", "func(text:Text, pattern:Pattern -> [Text])"}, {"from_bytes", "Text$from_bytes", "func(bytes:[Byte] -> Text)"}, {"from_c_string", "Text$from_str", "func(str:CString -> Text)"}, |
