github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

bobtfish / moosex-types-iso8601

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (2)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (2)
    • 0.02
    • 0.01
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

ISO 8601 times and duration strings, with coercions from DateTimes — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Add README 
bobtfish (author)
Fri Oct 09 03:23:24 -0700 2009
commit  e59c295a571542c0bddbf6605732c29e5782dabb
tree    04c98634a5cf2e62fc5fb9a4f608f1cf0d21db7d
parent  5c8d74128648d8b4e26f99de67403a1cb9c8cc85
moosex-types-iso8601 /
name age
history
message
file .gitignore Fri Oct 09 03:02:49 -0700 2009 Add built dists to .gitignore [bobtfish]
file Changes Fri Oct 09 03:01:37 -0700 2009 Bump versions, changelog [bobtfish]
file MANIFEST.SKIP Thu Jun 11 10:02:18 -0700 2009 Add MANIFEST.SKIP [bobtfish]
file Makefile.PL Fri Oct 09 03:23:24 -0700 2009 Add README [bobtfish]
file README Fri Oct 09 03:23:24 -0700 2009 Add README [bobtfish]
directory lib/ Fri Oct 09 03:01:37 -0700 2009 Bump versions, changelog [bobtfish]
directory t/ Fri Oct 09 03:00:07 -0700 2009 And all done [bobtfish]
README
NAME
    MooseX::Types::ISO8601 - ISO8601 date and duration string type
    constraints and coercions for Moose

SYNOPSIS
        use MooseX::Types::ISO8601 qw/
            ISO8601TimeDurationStr
        /;

        has duration => (
            isa => ISO8601TimeDurationStr,
            is => 'ro',
            coerce => 1,
        );

        Class->new( duration => 60 ); # 60s => PT00H01M00S
        Class->new( duration => DateTime::Duration->new(%args) )

DESCRIPTION
    This module packages several TypeConstraints with coercions for working
    with ISO8601 date strings and the DateTime suite of objects.

DATE CONSTRAINTS
  ISO8601DateStr
    An ISO8601 date string. E.g. "2009-06-11"

  ISO8601TimeStr
    An ISO8601 time string. E.g. "12:06:34Z"

  ISO8601DateTimeStr
    An ISO8601 combined datetime string. E.g. "2009-06-11T12:06:34Z"

  COERCIONS
    The date types will coerce from:

    " Num "
        The number is treated as a time in seconds since the unix epoch

    " DateTime "
        The duration represented as a DateTime object.

DURATION CONSTRAINTS
  ISO8601DateDurationStr
    An ISO8601 date duration string. E.g. "P01Y01M01D"

  ISO8601TimeDurationStr
    An ISO8601 time duration string. E.g. "PT01H01M01S"

  ISO8601DateTimeDurationStr
    An ISO8601 comboined date and time duration string. E.g.
    "P01Y01M01DT01H01M01S"

  COERCIONS
    The duration types will coerce from:

    " Num "
        The number is treated as a time in seconds

    " DateTime::Duration "
        The duration represented as a DateTime::Duration object.

SEE ALSO
    *   MooseX::Types::DateTime

    *   DateTime

    *   DateTime::Duration

    *   DateTime::Format::Duration

VERSION CONTROL
        http://github.com/bobtfish/moosex-types-iso8601/tree/master

    Patches are welcome.

BUGS
    Probably full of them, patches are very welcome.

    Specifically missing features:

    No timezone support - all times are assumed UTC
    No week number type
    Tests are rubbish.

AUTHOR
    Tomas Doran (t0m) "<bobtfish@bobtfish.net>"

    The development of this code was sponsored by my employer
    <http://www.state51.co.uk>.

COPYRIGHT
        Copyright (c) 2009 Tomas Doran. Some rights reserved.
        This program is free software; you can redistribute
        it and/or modify it under the same terms as Perl itself.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server