Date/Time modules - any without default months/days?

Discussion in 'Perl Misc' started by philkime, Nov 26, 2010.

  1. philkime

    philkime Guest

    It seems that DateTime and Class::Date both will default month and day
    to "1" if you try to create an object with just a year:

    $d = new("2003")

    gives $d->month = 1

    Is there a module that doesn't do this? I need to be able to create
    date objects which are potentially just a year and need to be able
    also to distinguish between really passing month = 1 and having it
    default to 1. It seems very odd these modules don't just return
    "undef" when no month is passed, for example.
    philkime, Nov 26, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Stockwell
    Replies:
    2
    Views:
    701
    Anna Martelli Ravenscroft
    Sep 20, 2004
  2. Gerrit
    Replies:
    0
    Views:
    386
    Gerrit
    Sep 20, 2004
  3. Terry Reedy
    Replies:
    0
    Views:
    428
    Terry Reedy
    Sep 20, 2004
  4. Replies:
    5
    Views:
    466
    Bo Yang
    Nov 2, 2006
  5. kirke

    list of days between two days

    kirke, Oct 19, 2006, in forum: Javascript
    Replies:
    7
    Views:
    136
    Julian Turner
    Oct 20, 2006
Loading...

Share This Page