summaryrefslogtreecommitdiff
path: root/lib/gcstar/GCUtils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gcstar/GCUtils.pm')
-rw-r--r--lib/gcstar/GCUtils.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gcstar/GCUtils.pm b/lib/gcstar/GCUtils.pm
index cc0e0d9..1921363 100644
--- a/lib/gcstar/GCUtils.pm
+++ b/lib/gcstar/GCUtils.pm
@@ -317,6 +317,23 @@ sub RtfToString
return $text;
}
+ sub cutReversedDate
+ {
+ my ($date, $group) = @_;
+ return $date if $group eq 'days';
+ $date =~ m|([0-9]{4})/([0-9]{2})/([0-9]{2})|;
+ my $result = $1;
+ $result .= "/$2" if $group eq 'months';
+ return $result;
+ }
+
+ sub completePartialDate
+ {
+ my (@date) = @_;
+ push @date, "01" while @date < 3;
+ return @date;
+ }
+
# Useful to compare date
sub reverseDate
{