generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Datetime
Liam Riddell edited this page Sep 9, 2023
·
2 revisions
Journey through the river of time with the Datetime Provider! Explore specialized functions that bring the abstract essence of time right at your fingertips.
In the intricate dance with time, use these expressions to choreograph your sequence:
- Addition: Adding a span to a moment.
- Subtraction: Take away time, but not experiences.
- Time Until Date: Count down to special moments.
- Time Since Date: Relive the moments that made history.
- Primitive: The fundamental pieces of the temporal puzzle.
Add a sprinkle of timespan to your special dates.
-
Syntax:
Primitive add Timespan
// Adding a Timespan to Now
now add 3 days
Rewind the clock or leap into the future.
-
Syntax:
Primitive subtract Timespan
// Rolling back time
today subtract 1 week
Capture raw instances of time, both specific and relative.
-
Now: This very moment.
now
-
Today: The present day.
today
-
Tomorrow: A glimpse into the future.
tomorrow
-
Yesterday: A blast from the recent past.
yesterday
-
NextDayOfWeek: Eager for the weekend? Use
next Saturday
. -
LastDayOfWeek: Nostalgic about the start of the week? Think
last Monday
.
Evoke the excitement of counting down or the sentiment of counting the moments since a day.
-
Syntax:
(year | month | week | day) until Datetime
-
Syntax:
(year | month | week | day) since Datetime
// Days left until a special date
days until 25/12/23
// Time since a momentous occasion
1 year since 1/1/22
Capture the essence of time in various styles.
-
ISO 8601: Universal and precise.
YYYY-MM-DDTHH:MM:SS
-
European/US: A blend of cultures.
DD/MM/YYYY
orMM-DD-YYYY
orDD.MM.YYYY
// ISO 8601
2023-09-09T12:30:00
// European Style
9/9/23 12:30
Navigate the expanse of time, from milliseconds to years.
-
Syntax:
number unitsOfTime
// Span of time
2 weeks