Hello jasonwolf,

I personaly prefer Date::Manip.

Sample of code:

#!/usr/bin/perl use strict; use warnings; use Date::Manip; use Data::Dumper; # Y M W D H M S base''start''end' my @dates = ParseRecur("0:1:0:0:0:0:0","","today", "Jan 1 2019"); # my @dates = ParseRecur("0:1:0:0:0:0:0","","today", "01/01/2019"); # my @dates = ParseRecur("0:1:0:0:0:0:0","","today", "1st January 2019 +"); # my @dates = ParseRecur("0:1:0:0:0:0:0","","today", "First of January + 2019"); my @datesFormatted = map { UnixDate($_, '%Y-%m-%d') } @dates; print Dumper \@datesFormatted; __END__ $ perl test.pl $VAR1 = [ '2018-01-24', '2018-02-24', '2018-03-24', '2018-04-24', '2018-05-24', '2018-06-24', '2018-07-24', '2018-08-24', '2018-09-24', '2018-10-24', '2018-11-24', '2018-12-24' ];

Update: Adding a few more different string inputs on the end date format.

Hope this helps, BR.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: Calendar library - appointment recurrance by thanos1983
in thread Calendar library - appointment recurrance by jasonwolf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.