Skip to content

Commit

Permalink
hu.sor: add common day and month affixation for extended date formats
Browse files Browse the repository at this point in the history
  • Loading branch information
laszlonemeth committed May 25, 2018
1 parent 620050e commit ef53a66
Showing 1 changed file with 45 additions and 12 deletions.
57 changes: 45 additions & 12 deletions data/hu.sor
Original file line number Diff line number Diff line change
Expand Up @@ -189,23 +189,32 @@ ZAR:(.) $(\1: dél-afrikai rand, cent)

== -a ==

1 1-je
2 2-a
"(1|.* 1)" \1-je
"(2|.* 2)" \1-a

== -ai ==

"(1|.* 1)" \1-jei
0"(2|.* 2)" \1-ai

== -i ==

"(1|.* 1)" \1-ji

== -án ==

1 1-jén
2 2-án
"(1|.* 1)" \1-jén
"(2|.* 2)" \1-án

== -áig ==

1 1-jéig
2 2-áig
"(1|.* 1)" \1-jéig
"(2|.* 2)" \1-áig

== -ától ==

1 1-jétől
2 2-ától
"(1|.* 1)" \1-jétől
"(2|.* 2)" \1-ától

== -d ==

Expand Down Expand Up @@ -242,8 +251,32 @@ ZAR:(.) $(\1: dél-afrikai rand, cent)
([{\(\[]?(\d+|[a-zA-Z])[}\]\)]?) $(-szor $(-szoros \1))
(.*-sz.r).s \1

== -ig ==

szerda szerdáig
((.*\d|[{\(\[]?[a-zA-Z])[}\)\]]?) \1-ig
(.*\D) \1ig

== -tól ==

szerda szerdától
(hétfő|kedd|csütörtök|péntek|(szeptem|októ|novem|decem)ber) \1től
(szombat|vasárnap|(jan|febr)uár|március|április|május|jú(n|l)ius|augusztus) \1tól

== -ban ==

((szeptem|októ|novem|decem)ber) \1ben
((jan|febr)uár|március|április|május|jú(n|l)ius|augusztus) \1ban

== -n ==

hétfő hétfőn
kedd kedden
szerda szerdán
csütörtök csütörtökön
péntek pénteken
(szombat|vasárnap) \1on

(.*5[}\)\]]?) \1-ön
([{\(\[]?(0|.*2|.*[^0]0{6,8}|.*[^0]0{12,14}|[abcdeghijkopqtuvwzABCDEGHIJKOPQTUVWZ][.]?)[}\)\]]?) \1-n
(.?(\d+|[flmnrsxyFLMNRSXY][.]?)[}\)\]]?) $(-on \1)
Expand Down Expand Up @@ -274,7 +307,7 @@ ZAR:(.) $(\1: dél-afrikai rand, cent)
(.*)al \1á
(.*)el \1é

== (-a|-ad|-án|-áig|-ban?|-ból|-hoz|-nak|-nál|-on|-ra|-ról|-as|-szoros|-at|-á?tól|-ul) ==
== (-a|-ad|-ai|-án|-áig|-ban?|-ból|-hoz|-i|-nak|-nál|-on|-ra|-ról|-as|-szoros|-at|-á?tól|-ul) ==

# 1-be, 2-nek, 4-et etc., b)-ben, c)-ből, d)-hez, n-et etc.
# add affix after conversion to the alternative form
Expand All @@ -283,15 +316,15 @@ ZAR:(.) $(\1: dél-afrikai rand, cent)

# otherwise: 0-ba, 3-at, 6-nál etc., a)-ban, h)-ból, k-hoz, y-ról etc.

([{\(\[]?([0-9]+|[ahkoquyAHKOQUY][.]?)[}\)\]]?) \2\1
([{\(\[]?(.*[0-9]+|[ahkoquyAHKOQUY][.]?)[}\)\]]?) \2\1

# conversion to the alternative form: -ban -> -ben etc.

-szoros -szeres
(.*)[ao](.*) \2e\3
-(.*)[ao](.*) -\2e\3
-([brt])ól -\2ől
-ától -étől
(.*)[á](.*) \2é\3
-(.*)[á](.*) -\2é\3
-ul -ül

== help ==
Expand Down

0 comments on commit ef53a66

Please sign in to comment.