Files
lotherkandClaude Opus 5.5 3b2a54c64b ext/src/mcde: import CDE 2.5.3 and pkgsrc wm/cde unchanged (the base of the MCDE fork)
cde-2.5.3.tar.gz, SHA512 a01b413b... as in pkgsrc distinfo; recipe from
pkgsrc 3c1118e94432.  Added with -f: CDE's .gitignore hides 612 files of
the archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:36:46 +00:00

30 lines
688 B
Perl
Executable File

#!/usr/bin/perl
# Script to convert and compare datestrings in the form of dd-Mmm-yy.hh.mm.ss
%monthnum = (
Jan, 0, Feb, 1, Mar, 2, Apr, 3, May, 4, Jun, 5,
Jul, 6, Aug, 7, Sep, 8, Oct, 9, Nov, 10, Dec, 11
);
$firstp = &cvtdate(@ARGV[0]);
$secondp = &cvtdate(@ARGV[1]);
exit ( $firstp cmp $secondp );
#Convert dd-Mmm-yy.hh:mm:ss
sub cvtdate {
local($str) = @_;
$str =~ /^(\d\d)-([a-zA-Z]{3})-(\d\d).(\d\d):(\d\d):(\d\d)$/;
$mon = $monthnum{$2};
$mday = $1; $year = $3;
$hour = $4; $min = $5; $sec = $6;
if ( $mon <= 9 ) {
$mon = "0".$mon;
}
if ( $year <= 50) {
$year = $year + 2000; }
else {
$year = $year + 1900;
}
$date = "$year$mon$mday";
return ($date);
}