Skip to content

Dates, MNEMONICS and relative date MNEMONICS

Gene M. Angelo, Jr edited this page Jan 7, 2024 · 4 revisions

Dates

These notes apply to anywhere DATE may be used.

DATE may be any date string that can be parsed using the Ruby language Time.parse class method. Consequently, you may omit the year if the date you want to display is the current year (e.g. <month>/<day>, or 1/31). For example: require 'time'; Time.parse('2023/01/02'); Time.parse('1/2/2023'); Time.parse('1/2') # etc.

Examples

dsu l dd -f 11/01/2023 -t 11/15/2023

MNEMONICS

These notes apply to anywhere MNEMONIC may be used.

A mnemonic may be any of the following: n|today|t|tomorrow|y|yesterday.

Where n, t, y are aliases for today, tomorrow, and yesterday, respectively.

Examples

dsu list dates -f yesterday -t today

Relative date MNEMONICS

These notes apply to anywhere MNEMONIC may be used.

A relative date mnemonic may be any of the following: +n|-n.

Where +n, -n are relative date mnemonics (RDMs). Generally speaking, RDMs are relative to the current date. For example, a RDM of +1 would be equal to Time.now + 1.day (or tomorrow), and a RDM of -1 would be equal to Time.now - 1.day (or yesterday).

NOTE: The behavior that RDMs have on some commands are context dependent; in such cases the behavior will be noted in the help appropriate to the command, for example see the following dsu command help: dsu list help date and dsu list help dates for examples.

Examples

dsu list dates -f today -t -6