diff options
author | Jonas <dr@jones.dk> | 2013-07-07 11:56:42 +0200 |
---|---|---|
committer | Jonas <dr@jones.dk> | 2013-07-07 11:56:42 +0200 |
commit | 0806f2aef343a2892d295d8772199dad2a6427c6 (patch) | |
tree | 30adb604c4c9f4bdd9387e551741f995089acf52 | |
parent | 67b306475fc96ac75fb2147e5dbe66ac966eefdd (diff) |
Handle all weekday combinations.
-rwxr-xr-x | bin/rdf2hours | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/bin/rdf2hours b/bin/rdf2hours index 340494c..a53995c 100755 --- a/bin/rdf2hours +++ b/bin/rdf2hours @@ -329,19 +329,31 @@ sub specdescribe { # TODO: translate properly $weekdays =~ s/1, 2, 3, 4, 5, 6, 7/alle ugedage/; + $weekdays =~ s/1, 2, 3, 4, 5, 6/mandag-lørdag/; $weekdays =~ s/1, 2, 3, 4, 5/mandag-fredag/; $weekdays =~ s/1, 2, 3, 4/mandag-torsdag/; + $weekdays =~ s/1, 2, 3/mandag-onsdag/; + $weekdays =~ s/1, 2/mandag-tirsdag/; + $weekdays =~ s/1/mandag/; $weekdays =~ s/2, 3, 4, 5, 6, 7/tirsdag-søndag/; $weekdays =~ s/2, 3, 4, 5, 6/tirsdag-lørdag/; $weekdays =~ s/2, 3, 4, 5/tirsdag-fredag/; - $weekdays =~ s/3, 4, 5/onsdag-fredag/; - $weekdays =~ s/^2, 3, 4(|, [^5].*)$/tirsdag-torsdag$1/; - $weekdays =~ s/^(|.*?[\d^5], |.*?(?!fredag, ))6, 7(.*)$/$1weekend$2/; - $weekdays =~ s/1/mandag/; + $weekdays =~ s/2, 3, 4/tirsdag-torsdag/; + $weekdays =~ s/2, 3/tirsdag-onsdag/; $weekdays =~ s/2/tirsdag/; + $weekdays =~ s/3, 4, 5, 6, 7/onsdag-søndag/; + $weekdays =~ s/3, 4, 5, 6/onsdag-lørdag/; + $weekdays =~ s/3, 4, 5/onsdag-fredag/; + $weekdays =~ s/3, 4/onsdag-torsdag/; $weekdays =~ s/3/onsdag/; + $weekdays =~ s/4, 5, 6, 7/torsdag-søndag/; + $weekdays =~ s/4, 5, 6/torsdag-lørdag/; + $weekdays =~ s/4, 5/torsdag-fredag/; $weekdays =~ s/4/torsdag/; + $weekdays =~ s/5, 6, 7/fredag-søndag/; + $weekdays =~ s/5, 6/fredag-lørdag/; $weekdays =~ s/5/fredag/; + $weekdays =~ s/6, 7/weekend/; $weekdays =~ s/6/lørdag/; $weekdays =~ s/7/søndag/; $weekdays =~ s/8/helligdage/; |