Skip to content

Listing DSU entries

Gene M. Angelo, Jr edited this page Jan 5, 2024 · 10 revisions

Displaying DSU Entries

You can display 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 preceeding 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

See the Dates section for more information on acceptable DATE formats used by dsu. See the Mnemonics section for more information on acceptable MNEMONIC rules and formats used by dsu.

IMPORTANT: In some cases the behavior relative date mnemonics (RDMs, see the Mnemonics section for more information about 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.

Examples

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

$ dsu list today

$ dsu l t

##=>
Saturday, (Today) 2023-05-06
  1. Blocked for locally failing test IN-12345

Friday, (Yesterday) 2023-05-05
  1. Pick up ticket IN-12345
  2. Attend new hire meet & greet

$ dsu list date 5/7/2023

$ dsu list d 2023/7/5

$ dsu l d 7/5 ## When omitting YYYY, MM/DD is assumed

##=>
Wednesday, (Today) 2023-07-05
  1. Blocked for locally failing test IN-12345

Tuesday, (Yesterday) 2023-07-04
  1. Pick up ticket IN-12345
  2. Attend new hire meet & greet

NOTE: If DATE (date|d) falls on a weekend or Monday, dsu will display any entries for the preceeding weekend and Friday.

Listing Date Ranges

For more information, see the Mnemonics section for more information on acceptable MNEMONIC rules and formats used by dsu.

NOTE: Output omitted for brevity...

Display the DSU entries for the last 3 days

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

$ dsu l dd -f y -t -2

Display the DSU entries for 1/1 to 1/4 for the current year

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

$ dsu l dd -f 1/1 -t +3

Display the DSU entries for 1/2 to 1/5

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

$ dsu l dd -f 1/5 -t -3

Display the DSU entries for the last week

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

$ dsu l dd -f n -t -6

Display the DSU entries back 1 week from yesterday's date

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

$ dsu l dd -f -7 -t +6

NOTE: 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 DSU entries back 1 week from yesterday's date.

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

$ dsu l dd -f y -t -6