-
Notifications
You must be signed in to change notification settings - Fork 0
cDateList
Ben Izd edited this page Jan 16, 2022
·
4 revisions
The output of DateList
is always a list of six elements (either 5 integers + 1 real or 6 integers).
Current DateList
with default TimeZone
:
cDateList[]
(* Out: {2022, 1, 16, 19, 49, 47.} *)
Current DateList
with custom TimeZone
:
cDateList[TimeZone -> 2]
(* Out: {2022, 1, 16, 18, 19, 47.} *)
Convert offset in second from 1900-1-1
to DateList
with Default TimeZone
:
cDateList[123456789]
(* Out: {1903, 11, 30, 21, 33, 9.} *)
Convert offset in second from 1900-1-1
to DateList
with custom TimeZone
:
cDateList[{2021, 2, 3}, TimeZone -> 2]
(* Out: {1903, 11, 30, 20, 3, 9.} *)
Get full length DateList
:
cDateList[{2021, 2, 3}]
(* Out: {2021, 2, 3, 0, 0, 0.} *)
cDateList[{2021, 2, 3}, TimeZone -> 2]
(* Out: {2021, 2, 2, 22, 30, 0.} *)
Correct numbers:
cDateList[{2021, 2, -1}]
(* Out: {2021, 1, 30, 0, 0, 0.} *)
Convert from other calendars to "Gregorian"
:
cDateList[DateObject[{1404, 1, 1}, CalendarType -> "ArithmeticPersian"]]
(* Out: {2025, 3, 20, 0, 0, 0.} *)
Convert from other calendars to "Gregorian"
with custom Method
:
cDateList[DateObject[{1404, 1, 1}, CalendarType -> "ArithmeticPersian"], Method -> "Cycle-2820-2"]
(* Out: {2025, 3, 21, 0, 0, 0.} *)
My system TimeZone
is +3.5
.
Normal Functions (Pure Wolfram-Language):
Low-Level Functions (via LibraryLink
):