Advertisement
Guest User

two semicolons

a guest
Sep 23rd, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.52 KB | None | 0 0
  1. #| Run internal tests
  2. multi sub MAIN('test') {
  3.     use Test;
  4.     plan 4;
  5.     is-deeply from-timestamp(1450915200), Date.new('2015-12-24'),
  6.         'Timestamp to Date';;
  7.  
  8.     my $dt = from-timestamp(1450915201);
  9.     is $dt, "2015-12-24 00:00:01",
  10.         'Timestamp to DateTime with string formatting';
  11.  
  12.     is from-date-string('2015-12-24').posix, 1450915200,
  13.         'from-date-string, one argument';
  14.     is from-date-string('2015-12-24', '00:00:01').posix, 1450915201,
  15.         'from-date-string, two arguments';
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement