Changeset 1965

Show
Ignore:
Timestamp:
09/25/06 17:45:50
Author:
miyagawa
Message:

allow --month option

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/30boxes

    r1964 r1965  
    5757               "end=s", 
    5858               "to=s", 
     59               "month=s", 
    5960               "help", 
    6061               "config=s") 
     
    7172    $args{start} = parse_date($args{start}) if $args{start}; 
    7273    $args{end}   = parse_date($args{end})   if $args{end}; 
     74 
     75    # map month to start/end 
     76    if ($args{month}) { 
     77        $args{start} = parse_date($args{month}); 
     78        my($year, $month, $day) = split /-/, $args{start}; 
     79        my $end = Date_DaysInMonth($month, $year); 
     80        $args{end}   = "$year-$month-$end"; 
     81    } 
    7382 
    7483    setup_config(); 
     
    184193  30boxes del <event-id> 
    185194 
     195    Options: 
     196      --from, --start           Start date of events to search for 
     197      --to, --end               End date of events to search for 
     198      --month                   Month of events to search for 
     199 
    186200  30boxes list 
    187201        List all events in your calendar, starting from today to 90 days later. 
     
    190204        List all events in your calendar, starting from 2 weeks ago to today. 
    191205 
     206  30boxes --month "2006 September" 
     207        List all events in your calendar scheduled on September, 2006. 
     208 
    192209  30boxes add Meeting with Bob tomorrow 3pm 
    193210        Add new event titled "Meeting with Bob" on 3pm tomorrow.