[kdepim-users] konsolekalendar: print next month

Kevin Krammer kevin.krammer at gmx.at
Mon May 11 18:42:19 BST 2009


On Monday, 2009-05-11, Dotan Cohen wrote:
> How does one get konsolekalendar to print _next_ month's calendar in
> HTMLMonth view? I need a solution that will work regardless of what
> the current date is, so simply stating a date will not work as this is
> for a script, not a one-time run.

Well, you could always get the next month within the script itself like

THISMONTH=$(date +"%Y-%m")-01                                                                                                                                                      
NEXTMONTHBEGIN=$(date  -d "$THISMONTH +1 month" +"%Y-%m")-01                                                                                                                       
NEXTMONTHEND=$(date  -d "$THISMONTH +2 months -1 day" +"%Y-%m-%d")

echo $NEXTMONTHBEGIN - $NEXTMONTHEND

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdepim-users/attachments/20090511/54cba147/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM users mailing list
kdepim-users at kde.org
https://mail.kde.org/mailman/listinfo/kdepim-users


More information about the kdepim-users mailing list