From f7880ce83ba82ada2d04a0c587448446e677d458 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 6 Jul 2022 17:11:35 -0400 Subject: Moved "lux/time" to "lux/world/time". --- stdlib/source/documentation/lux.lux | 2 - stdlib/source/documentation/lux/time.lux | 71 ---------------------- stdlib/source/documentation/lux/time/date.lux | 38 ------------ stdlib/source/documentation/lux/time/day.lux | 30 --------- stdlib/source/documentation/lux/time/duration.lux | 47 -------------- stdlib/source/documentation/lux/time/instant.lux | 56 ----------------- stdlib/source/documentation/lux/time/month.lux | 38 ------------ stdlib/source/documentation/lux/time/year.lux | 48 --------------- stdlib/source/documentation/lux/world.lux | 6 +- stdlib/source/documentation/lux/world/time.lux | 71 ++++++++++++++++++++++ .../source/documentation/lux/world/time/date.lux | 38 ++++++++++++ stdlib/source/documentation/lux/world/time/day.lux | 30 +++++++++ .../documentation/lux/world/time/duration.lux | 47 ++++++++++++++ .../documentation/lux/world/time/instant.lux | 56 +++++++++++++++++ .../source/documentation/lux/world/time/month.lux | 38 ++++++++++++ .../source/documentation/lux/world/time/year.lux | 48 +++++++++++++++ 16 files changed, 332 insertions(+), 332 deletions(-) delete mode 100644 stdlib/source/documentation/lux/time.lux delete mode 100644 stdlib/source/documentation/lux/time/date.lux delete mode 100644 stdlib/source/documentation/lux/time/day.lux delete mode 100644 stdlib/source/documentation/lux/time/duration.lux delete mode 100644 stdlib/source/documentation/lux/time/instant.lux delete mode 100644 stdlib/source/documentation/lux/time/month.lux delete mode 100644 stdlib/source/documentation/lux/time/year.lux create mode 100644 stdlib/source/documentation/lux/world/time.lux create mode 100644 stdlib/source/documentation/lux/world/time/date.lux create mode 100644 stdlib/source/documentation/lux/world/time/day.lux create mode 100644 stdlib/source/documentation/lux/world/time/duration.lux create mode 100644 stdlib/source/documentation/lux/world/time/instant.lux create mode 100644 stdlib/source/documentation/lux/world/time/month.lux create mode 100644 stdlib/source/documentation/lux/world/time/year.lux (limited to 'stdlib/source/documentation') diff --git a/stdlib/source/documentation/lux.lux b/stdlib/source/documentation/lux.lux index 578bee850..321aebffd 100644 --- a/stdlib/source/documentation/lux.lux +++ b/stdlib/source/documentation/lux.lux @@ -28,7 +28,6 @@ ["[1][0]" program] ["[1][0]" static] ["[1][0]" test] - ["[1][0]" time] ["[1][0]" world]]) (.`` (.def .public documentation @@ -898,7 +897,6 @@ /program.documentation /static.documentation /test.documentation - /time.documentation /world.documentation]))) (program: inputs diff --git a/stdlib/source/documentation/lux/time.lux b/stdlib/source/documentation/lux/time.lux deleted file mode 100644 index f327e942a..000000000 --- a/stdlib/source/documentation/lux/time.lux +++ /dev/null @@ -1,71 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]] - ["[0]" / - ["[1][0]" date] - ["[1][0]" day] - ["[1][0]" duration] - ["[1][0]" instant] - ["[1][0]" month] - ["[1][0]" year]]) - -(`` (.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.time_exceeds_a_day) - ($.default /.invalid_hour) - ($.default /.invalid_minute) - ($.default /.invalid_second) - ($.default /.millis) - ($.default /.equivalence) - ($.default /.order) - ($.default /.enum) - ($.default /.parser) - - (,, (with_template [ ] - [($.documentation - )] - - [/.milli_seconds "Number of milli-seconds in a second."] - [/.seconds "Number of seconds in a minute."] - [/.minutes "Number of minutes in an hour."] - [/.hours "Number of hours in an day."] - )) - - ($.documentation /.Time - "Time is defined as milliseconds since the start of the day (00:00:00.000).") - - ($.documentation /.midnight - "The instant corresponding to the start of the day: 00:00:00.000") - - ($.documentation /.of_millis - "" - [(of_millis milli_seconds)]) - - ($.documentation /.Clock - "A clock marking the specific hour, minute, second, and milli-second in a day.") - - ($.documentation /.clock - "" - [(clock time)]) - - ($.documentation /.time - "" - [(time clock)]) - - ($.documentation /.codec - (format "Based on ISO 8601." - \n "For example: 21:14:51.827"))] - [/date.documentation - /day.documentation - /duration.documentation - /instant.documentation - /month.documentation - /year.documentation]))) diff --git a/stdlib/source/documentation/lux/time/date.lux b/stdlib/source/documentation/lux/time/date.lux deleted file mode 100644 index 17fd0143b..000000000 --- a/stdlib/source/documentation/lux/time/date.lux +++ /dev/null @@ -1,38 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.invalid_day) - ($.default /.epoch) - ($.default /.year) - ($.default /.month) - ($.default /.day_of_month) - ($.default /.equivalence) - ($.default /.order) - ($.default /.invalid_month) - ($.default /.parser) - ($.default /.days) - ($.default /.of_days) - ($.default /.enum) - - ($.documentation /.Date - "A date specified as a year/month/day triplet.") - - ($.documentation /.date - "A date, within the allowed limits." - [(date year month day_of_month)]) - - ($.documentation /.codec - (format "Based on ISO 8601." - \n "For example: 2017-01-15"))] - [])) diff --git a/stdlib/source/documentation/lux/time/day.lux b/stdlib/source/documentation/lux/time/day.lux deleted file mode 100644 index e7923dfe0..000000000 --- a/stdlib/source/documentation/lux/time/day.lux +++ /dev/null @@ -1,30 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.equivalence) - ($.default /.order) - ($.default /.enum) - ($.default /.not_a_day_of_the_week) - ($.default /.codec) - ($.default /.number) - ($.default /.invalid_day) - ($.default /.by_number) - ($.default /.hash) - - ($.documentation /.Day - "A day of the week.") - - ($.documentation /.week - "All the days, ordered by when they come in a week.")] - [])) diff --git a/stdlib/source/documentation/lux/time/duration.lux b/stdlib/source/documentation/lux/time/duration.lux deleted file mode 100644 index 0b9ddaa0b..000000000 --- a/stdlib/source/documentation/lux/time/duration.lux +++ /dev/null @@ -1,47 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.of_millis) - ($.default /.millis) - ($.default /.composite) - ($.default /.framed) - ($.default /.up) - ($.default /.down) - ($.default /.inverse) - ($.default /.ticks) - ($.default /.equivalence) - ($.default /.order) - ($.default /.positive?) - ($.default /.negative?) - ($.default /.neutral?) - ($.default /.empty) - ($.default /.milli_second) - ($.default /.second) - ($.default /.minute) - ($.default /.hour) - ($.default /.day) - ($.default /.week) - ($.default /.normal_year) - ($.default /.leap_year) - ($.default /.monoid) - ($.default /.codec) - ($.default /.enum) - - ($.documentation /.Duration - "Durations have a resolution of milli-seconds.") - - ($.documentation /.difference - "" - [(difference from to)])] - [])) diff --git a/stdlib/source/documentation/lux/time/instant.lux b/stdlib/source/documentation/lux/time/instant.lux deleted file mode 100644 index c5fbe2b01..000000000 --- a/stdlib/source/documentation/lux/time/instant.lux +++ /dev/null @@ -1,56 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.of_millis) - ($.default /.millis) - ($.default /.equivalence) - ($.default /.order) - ($.default /.enum) - ($.default /.date) - ($.default /.time) - ($.default /.day_of_week) - - ($.documentation /.Instant - "Instant is defined as milli-seconds since the epoch.") - - ($.documentation /.span - "" - [(span from to)]) - - ($.documentation /.after - "" - [(after duration instant)]) - - ($.documentation /.relative - "" - [(relative instant)]) - - ($.documentation /.absolute - "" - [(absolute offset)]) - - ($.documentation /.epoch - "The instant corresponding to 1970-01-01T00:00:00Z.") - - ($.documentation /.codec - (format "Based on ISO 8601." - \n "For example: 2017-01-15T21:14:51.827Z")) - - ($.documentation /.now - "Yields the current instant, as measured from the operating-system's clock.") - - ($.documentation /.of_date_time - "" - [(of_date_time date time)])] - [])) diff --git a/stdlib/source/documentation/lux/time/month.lux b/stdlib/source/documentation/lux/time/month.lux deleted file mode 100644 index 9e9d4dc28..000000000 --- a/stdlib/source/documentation/lux/time/month.lux +++ /dev/null @@ -1,38 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.equivalence) - ($.default /.number) - ($.default /.invalid_month) - ($.default /.by_number) - ($.default /.hash) - ($.default /.order) - ($.default /.enum) - ($.default /.not_a_month_of_the_year) - ($.default /.codec) - - ($.documentation /.Month - "A month of the year.") - - ($.documentation /.days - "The amount of days of a month." - [(days month)]) - - ($.documentation /.leap_year_days - "The amount of days of a month (in a leap year)." - [(leap_year_days month)]) - - ($.documentation /.year - "All the months, ordered by when they come in a year.")] - [])) diff --git a/stdlib/source/documentation/lux/time/year.lux b/stdlib/source/documentation/lux/time/year.lux deleted file mode 100644 index 1ac6a11ca..000000000 --- a/stdlib/source/documentation/lux/time/year.lux +++ /dev/null @@ -1,48 +0,0 @@ -(.require - [library - [lux (.except and) - ["$" documentation] - [data - ["[0]" text (.only \n) - ["%" \\format (.only format)]]]]] - [\\library - ["[0]" /]]) - -(.def .public documentation - (.List $.Module) - ($.module /._ - "" - [($.default /.there_is_no_year_0) - ($.default /.value) - ($.default /.epoch) - ($.default /.leap) - ($.default /.century) - ($.default /.era) - ($.default /.leap?) - ($.default /.parser) - ($.default /.equivalence) - ($.default /.order) - - ($.documentation /.Year - (format "A year in the gregorian calendar." - \n "Both negative (< 0) and positive (> 0) values are valid, but not 0." - \n "This is because the first year of the gregorian calendar was year 1.")) - - ($.documentation /.year - "A valid year in the gregorian calendar, if possible." - [(year value)]) - - ($.documentation /.days - "The amount of days in a typical year.") - - ($.documentation /.Period - "An amount of years.") - - ($.documentation /.leaps - "The number of leap years in a period of years." - [(leaps year)]) - - ($.documentation /.codec - (format "Based on ISO 8601." - \n "For example: 2017"))] - [])) diff --git a/stdlib/source/documentation/lux/world.lux b/stdlib/source/documentation/lux/world.lux index 7376eb311..777b02678 100644 --- a/stdlib/source/documentation/lux/world.lux +++ b/stdlib/source/documentation/lux/world.lux @@ -19,7 +19,8 @@ ["[1]/[0]" video ["[1]/[0]" resolution]]] ["[1][0]" environment] - ["[1][0]" shell]]) + ["[1][0]" shell] + ["[1][0]" time]]) (.def .public documentation (.List $.Module) @@ -30,4 +31,5 @@ /net.documentation /output/video/resolution.documentation /environment.documentation - /shell.documentation)) + /shell.documentation + /time.documentation)) diff --git a/stdlib/source/documentation/lux/world/time.lux b/stdlib/source/documentation/lux/world/time.lux new file mode 100644 index 000000000..f327e942a --- /dev/null +++ b/stdlib/source/documentation/lux/world/time.lux @@ -0,0 +1,71 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]] + ["[0]" / + ["[1][0]" date] + ["[1][0]" day] + ["[1][0]" duration] + ["[1][0]" instant] + ["[1][0]" month] + ["[1][0]" year]]) + +(`` (.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.time_exceeds_a_day) + ($.default /.invalid_hour) + ($.default /.invalid_minute) + ($.default /.invalid_second) + ($.default /.millis) + ($.default /.equivalence) + ($.default /.order) + ($.default /.enum) + ($.default /.parser) + + (,, (with_template [ ] + [($.documentation + )] + + [/.milli_seconds "Number of milli-seconds in a second."] + [/.seconds "Number of seconds in a minute."] + [/.minutes "Number of minutes in an hour."] + [/.hours "Number of hours in an day."] + )) + + ($.documentation /.Time + "Time is defined as milliseconds since the start of the day (00:00:00.000).") + + ($.documentation /.midnight + "The instant corresponding to the start of the day: 00:00:00.000") + + ($.documentation /.of_millis + "" + [(of_millis milli_seconds)]) + + ($.documentation /.Clock + "A clock marking the specific hour, minute, second, and milli-second in a day.") + + ($.documentation /.clock + "" + [(clock time)]) + + ($.documentation /.time + "" + [(time clock)]) + + ($.documentation /.codec + (format "Based on ISO 8601." + \n "For example: 21:14:51.827"))] + [/date.documentation + /day.documentation + /duration.documentation + /instant.documentation + /month.documentation + /year.documentation]))) diff --git a/stdlib/source/documentation/lux/world/time/date.lux b/stdlib/source/documentation/lux/world/time/date.lux new file mode 100644 index 000000000..17fd0143b --- /dev/null +++ b/stdlib/source/documentation/lux/world/time/date.lux @@ -0,0 +1,38 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.invalid_day) + ($.default /.epoch) + ($.default /.year) + ($.default /.month) + ($.default /.day_of_month) + ($.default /.equivalence) + ($.default /.order) + ($.default /.invalid_month) + ($.default /.parser) + ($.default /.days) + ($.default /.of_days) + ($.default /.enum) + + ($.documentation /.Date + "A date specified as a year/month/day triplet.") + + ($.documentation /.date + "A date, within the allowed limits." + [(date year month day_of_month)]) + + ($.documentation /.codec + (format "Based on ISO 8601." + \n "For example: 2017-01-15"))] + [])) diff --git a/stdlib/source/documentation/lux/world/time/day.lux b/stdlib/source/documentation/lux/world/time/day.lux new file mode 100644 index 000000000..e7923dfe0 --- /dev/null +++ b/stdlib/source/documentation/lux/world/time/day.lux @@ -0,0 +1,30 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.equivalence) + ($.default /.order) + ($.default /.enum) + ($.default /.not_a_day_of_the_week) + ($.default /.codec) + ($.default /.number) + ($.default /.invalid_day) + ($.default /.by_number) + ($.default /.hash) + + ($.documentation /.Day + "A day of the week.") + + ($.documentation /.week + "All the days, ordered by when they come in a week.")] + [])) diff --git a/stdlib/source/documentation/lux/world/time/duration.lux b/stdlib/source/documentation/lux/world/time/duration.lux new file mode 100644 index 000000000..0b9ddaa0b --- /dev/null +++ b/stdlib/source/documentation/lux/world/time/duration.lux @@ -0,0 +1,47 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.of_millis) + ($.default /.millis) + ($.default /.composite) + ($.default /.framed) + ($.default /.up) + ($.default /.down) + ($.default /.inverse) + ($.default /.ticks) + ($.default /.equivalence) + ($.default /.order) + ($.default /.positive?) + ($.default /.negative?) + ($.default /.neutral?) + ($.default /.empty) + ($.default /.milli_second) + ($.default /.second) + ($.default /.minute) + ($.default /.hour) + ($.default /.day) + ($.default /.week) + ($.default /.normal_year) + ($.default /.leap_year) + ($.default /.monoid) + ($.default /.codec) + ($.default /.enum) + + ($.documentation /.Duration + "Durations have a resolution of milli-seconds.") + + ($.documentation /.difference + "" + [(difference from to)])] + [])) diff --git a/stdlib/source/documentation/lux/world/time/instant.lux b/stdlib/source/documentation/lux/world/time/instant.lux new file mode 100644 index 000000000..c5fbe2b01 --- /dev/null +++ b/stdlib/source/documentation/lux/world/time/instant.lux @@ -0,0 +1,56 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.of_millis) + ($.default /.millis) + ($.default /.equivalence) + ($.default /.order) + ($.default /.enum) + ($.default /.date) + ($.default /.time) + ($.default /.day_of_week) + + ($.documentation /.Instant + "Instant is defined as milli-seconds since the epoch.") + + ($.documentation /.span + "" + [(span from to)]) + + ($.documentation /.after + "" + [(after duration instant)]) + + ($.documentation /.relative + "" + [(relative instant)]) + + ($.documentation /.absolute + "" + [(absolute offset)]) + + ($.documentation /.epoch + "The instant corresponding to 1970-01-01T00:00:00Z.") + + ($.documentation /.codec + (format "Based on ISO 8601." + \n "For example: 2017-01-15T21:14:51.827Z")) + + ($.documentation /.now + "Yields the current instant, as measured from the operating-system's clock.") + + ($.documentation /.of_date_time + "" + [(of_date_time date time)])] + [])) diff --git a/stdlib/source/documentation/lux/world/time/month.lux b/stdlib/source/documentation/lux/world/time/month.lux new file mode 100644 index 000000000..9e9d4dc28 --- /dev/null +++ b/stdlib/source/documentation/lux/world/time/month.lux @@ -0,0 +1,38 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.equivalence) + ($.default /.number) + ($.default /.invalid_month) + ($.default /.by_number) + ($.default /.hash) + ($.default /.order) + ($.default /.enum) + ($.default /.not_a_month_of_the_year) + ($.default /.codec) + + ($.documentation /.Month + "A month of the year.") + + ($.documentation /.days + "The amount of days of a month." + [(days month)]) + + ($.documentation /.leap_year_days + "The amount of days of a month (in a leap year)." + [(leap_year_days month)]) + + ($.documentation /.year + "All the months, ordered by when they come in a year.")] + [])) diff --git a/stdlib/source/documentation/lux/world/time/year.lux b/stdlib/source/documentation/lux/world/time/year.lux new file mode 100644 index 000000000..1ac6a11ca --- /dev/null +++ b/stdlib/source/documentation/lux/world/time/year.lux @@ -0,0 +1,48 @@ +(.require + [library + [lux (.except and) + ["$" documentation] + [data + ["[0]" text (.only \n) + ["%" \\format (.only format)]]]]] + [\\library + ["[0]" /]]) + +(.def .public documentation + (.List $.Module) + ($.module /._ + "" + [($.default /.there_is_no_year_0) + ($.default /.value) + ($.default /.epoch) + ($.default /.leap) + ($.default /.century) + ($.default /.era) + ($.default /.leap?) + ($.default /.parser) + ($.default /.equivalence) + ($.default /.order) + + ($.documentation /.Year + (format "A year in the gregorian calendar." + \n "Both negative (< 0) and positive (> 0) values are valid, but not 0." + \n "This is because the first year of the gregorian calendar was year 1.")) + + ($.documentation /.year + "A valid year in the gregorian calendar, if possible." + [(year value)]) + + ($.documentation /.days + "The amount of days in a typical year.") + + ($.documentation /.Period + "An amount of years.") + + ($.documentation /.leaps + "The number of leap years in a period of years." + [(leaps year)]) + + ($.documentation /.codec + (format "Based on ISO 8601." + \n "For example: 2017"))] + [])) -- cgit v1.2.3