File: 10-misc.t

package info (click to toggle)
libdate-extract-perl 0.07-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 284 kB
  • sloc: perl: 343; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 322 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
use strict;
use warnings;
use Test::More tests => 2;
use Date::Extract;

my $parser = Date::Extract->new;
my $dt = $parser->extract("writing a test today!");
is($dt->time_zone->name, 'floating', 'default time zone is floating');
is($dt->ymd, DateTime->today(time_zone => 'floating')->ymd, 'extracted the date as today');