Skip to content

Instantly share code, notes, and snippets.

@LadyAleena
Last active September 25, 2020 23:48
Show Gist options
  • Save LadyAleena/ee625e40955c4d28cee93dfe0d4d5149 to your computer and use it in GitHub Desktop.
Save LadyAleena/ee625e40955c4d28cee93dfe0d4d5149 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use feature qw(say);
use Date::Calc qw(Delta_Days);
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$mon += 1;
$year += 1900;
my @first_date = ( "2020", "3", "27" );
my @current_date = ( $year, $mon, $mday );
my $days = Delta_Days(@first_date, @current_date);
my $weeks = $days/7;
say "$weeks weeks";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment