App::Sqitch::DateTime - Sqitch DateTime object
my $dt = App::Sqitch::DateTime->new(%params); say $dt->as_string( format => 'iso' );
This subclass of DateTime provides additional interfaces to support named formats. These can be used for status or log --date-format options. App::Sqitch::DateTime provides a list of supported formats, validates that a format string, and uses the formats to convert itself into the appropriate string.
--date-format
as_string_formats
my @formats = App::Sqitch::DateTime->as_string_formats;
Returns a list of formats supported by the format parameter to as_string. The list currently includes:
format
as_string
iso
iso8601
ISO-8601 format.
rfc
rfc2822
RFC-2822 format.
full
long
medium
short
Localized format of the specified length.
raw
Show timestamps in raw format, which is strict ISO-8601 in the UTC time zone.
strftime:$string
Show timestamps using an arbitrary strftime pattern. See "strftime Paterns" in DateTime for comprehensive documentation of supported patterns.
strftime
cldr:$string
Show timestamps using an arbitrary cldr pattern. See "CLDR Paterns" in DateTime for comprehensive documentation of supported patterns.
cldr
validate_as_string_format
App::Sqitch::DateTime->validate_as_string_format($format);
Validates that a format is supported by as_string. Throws an exception if it's not, and returns if it is.
$dt->as_string; $dt->as_string( format => $format );
Returns a string representation using the provided format. The format must be one of those listed by as_string_formats or an exception will be thrown. If no format is passed, the string will be formatted with the raw format.
Documentation for the status command to the Sqitch command-line client.
status
Documentation for the log command to the Sqitch command-line client.
log
The Sqitch command-line client.
David E. Wheeler <david@justatheory.com>
Copyright (c) 2012-2015 iovation Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To install App::Sqitch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Sqitch
CPAN shell
perl -MCPAN -e shell install App::Sqitch
For more information on module installation, please visit the detailed CPAN module installation guide.