File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ program
4242 . option ( '--today' , 'ignores --from and --to and queries entries for today' )
4343 . option ( '--this_week' , 'ignores --from and --to and queries entries for this week' )
4444 . option ( '--this_month' , 'ignores --from and --to and queries entries for this month' )
45+ . option ( '--last_month' , 'ignores --from and --to and queries entries for last month' )
4546 . option ( '-c --closed' , 'include closed issues' )
4647 . option ( '-m --milestone <milestone>' , 'include issues from the given milestone' )
4748 . option ( '--hours_per_day <hours>' , 'hours per day for human readable time formats' )
@@ -168,6 +169,10 @@ if (program.opts().this_month)
168169 config
169170 . set ( 'from' , moment ( ) . startOf ( 'month' ) )
170171 . set ( 'to' , moment ( ) . endOf ( 'month' ) ) ;
172+ if ( program . opts ( ) . last_month )
173+ config
174+ . set ( 'from' , moment ( ) . subtract ( 1 , 'months' ) . startOf ( 'month' ) )
175+ . set ( 'to' , moment ( ) . subtract ( 1 , 'months' ) . endOf ( 'month' ) ) ;
171176
172177Cli . quiet = config . get ( 'quiet' ) ;
173178Cli . verbose = config . get ( '_verbose' ) ;
You can’t perform that action at this time.
0 commit comments