summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas <dr@jones.dk>2013-07-07 11:56:42 +0200
committerJonas <dr@jones.dk>2013-07-07 11:56:42 +0200
commit0806f2aef343a2892d295d8772199dad2a6427c6 (patch)
tree30adb604c4c9f4bdd9387e551741f995089acf52 /bin
parent67b306475fc96ac75fb2147e5dbe66ac966eefdd (diff)
Handle all weekday combinations.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/rdf2hours20
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/;