Skip to content

Listing DSU entries

Gene M. Angelo, Jr edited this page Mar 26, 2024 · 10 revisions

You can list DSU entries for a particular day or date using any of the following commands. When displaying DSU entries for a particular day or date, dsu will display the DSU entries for the given day or date, as well as the DSU entries for the previous day, relative to the given day or date. If the given day or date falls on a weekend or Monday, dsu will display any entries for the preceding weekend and Friday; this is so that you can share any activities that occurred over the weekend (if anything) as well as any activities for the previous Friday.

  • dsu list today
  • dsu l n # Equivalent to the above, only using shortcuts
  • dsu list tomorrow
  • dsu l t # Equivalent to the above, only using shortcuts
  • dsu list yesterday
  • dsu l y # Equivalent to the above, only using shortcuts
  • dsu list date DATE|MNEMONIC
  • dsu l d DATE|MNEMONIC # Equivalent to the above, only using shortcuts
  • dsu list dates OPTIONS
  • dsu l dd OPTIONS # Equivalent to the above, only using shortcuts

Examples

Listing today

The following displays the entries for "Today", where Time.now == '2023-05-06 08:54:57.6861 -0400'

dsu list today

dsu l t # Equivalent to the above, only using shortcuts

image

Listing a date

The following displays the entries for September 11, 2023 (which happens to be a Monday).

dsu list date 9/11/2023

dsu l d 9/11/2023 # Equivalent to the above, only using shortcuts

dsu l d 9/11 # When omitting YYYY, MM/DD is assumed

image

Listing a date range

See Dates, MNEMONICS and relative date MNEMONICS for more information.

Display the last 3 days

dsu list dates --from yesterday --to -2

dsu l dd -f y -t -2 # Equivalent to the above, only using shortcuts

Display from 1/1 to 1/4 of the current year

dsu list dates --from 1/1 --to +3

dsu l dd -f 1/1 -t +3 # Equivalent to the above, only using shortcuts

Display from 1/2 to 1/5 of the current year

dsu list dates --from 1/5 --to -3

dsu l dd -f 1/5 -t -3 # Equivalent to the above, only using shortcuts

Display back 1 week of entries starting from today

dsu list dates --from today --to -6

dsu l dd -f n -t -6 # Equivalent to the above, only using shortcuts

Display back 1 week from yesterday's date

dsu list dates --from -7 --to +6

dsu l dd -f -7 -t +6 # Equivalent to the above, only using shortcuts

The above example is silly, but it illustrates the fact that you can use relative mnemonics for both --from and --to options. While you can use relative mnemonics for both the --from and --to options, there is usually a more intuitive way; for example:

This can be accomplished MUCH easier by using the yesterday mnemonic. This will display the back 1 week from yesterday's date.

dsu list dates --from yesterday --to -6

dsu l dd -f y -t -6 # Equivalent to the above, only using shortcuts

Nothing to display

It there are no entries to display, dsu will display...

image

Displaying empty Entry Groups

You can force dsu to display empty Entry Groups by using the -a | --include-all

The below example would normally only display entry groups for 9/8/2023 and 9/11/2023 since they are the only entry groups with entries for the given range (9/8/2023 - 9/11/2023); however, using the -a | --include-all option forces display of the entry groups with no entries.

image

See also

See the Dates, MNEMONICS and relative date MNEMONICS wiki for more information on acceptable DATE formats used by dsu, MNEMONICS and relative date MNEMONICS.