my $self = $args->{as_localtime} ? $class->localtime() : $class->gmtime(); my $parsed = $self->strptime($args->{str}, '%Y-%m-%d');