comparison MoinMoin/support/parsedatetime/pdt_locales/de_DE.py @ 6098:83b1bc99457c

upgrade parsedatetime from 0.8.7 to 2.1
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 06 Sep 2016 00:09:31 +0200
parents
children
comparison
equal deleted inserted replaced
6097:815981fad7fd 6098:83b1bc99457c
1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
3 from .base import * # noqa
4
5 # don't use an unicode string
6 localeID = 'de_DE'
7 dateSep = ['.']
8 timeSep = [':']
9 meridian = []
10 usesMeridian = False
11 uses24 = True
12 decimal_mark = ','
13
14 Weekdays = [
15 'montag', 'dienstag', 'mittwoch',
16 'donnerstag', 'freitag', 'samstag', 'sonntag',
17 ]
18 shortWeekdays = ['mo', 'di', 'mi', 'do', 'fr', 'sa', 'so']
19 Months = [
20 'januar', 'februar', 'märz',
21 'april', 'mai', 'juni',
22 'juli', 'august', 'september',
23 'oktober', 'november', 'dezember',
24 ]
25 shortMonths = [
26 'jan', 'feb', 'mrz', 'apr', 'mai', 'jun',
27 'jul', 'aug', 'sep', 'okt', 'nov', 'dez',
28 ]
29
30 dateFormats = {
31 'full': 'EEEE, d. MMMM yyyy',
32 'long': 'd. MMMM yyyy',
33 'medium': 'dd.MM.yyyy',
34 'short': 'dd.MM.yy',
35 }
36
37 timeFormats = {
38 'full': 'HH:mm:ss v',
39 'long': 'HH:mm:ss z',
40 'medium': 'HH:mm:ss',
41 'short': 'HH:mm',
42 }
43
44 dp_order = ['d', 'm', 'y']
45
46 # the short version would be a capital M,
47 # as I understand it we can't distinguish
48 # between m for minutes and M for months.
49 units = {
50 'seconds': ['sekunden', 'sek', 's'],
51 'minutes': ['minuten', 'min', 'm'],
52 'hours': ['stunden', 'std', 'h'],
53 'days': ['tag', 'tage', 't'],
54 'weeks': ['wochen', 'w'],
55 'months': ['monat', 'monate'],
56 'years': ['jahr', 'jahre', 'j'],
57 }
58
59 re_values = re_values.copy()
60 re_values.update({
61 'specials': 'am|dem|der|im|in|den|zum',
62 'timeseparator': ':',
63 'rangeseparator': '-',
64 'daysuffix': '',
65 'qunits': 'h|m|s|t|w|m|j',
66 'now': ['jetzt'],
67 })
68
69 # Used to adjust the returned date before/after the source
70 # still looking for insight on how to translate all of them to german.
71 Modifiers = {
72 'from': 1,
73 'before': -1,
74 'after': 1,
75 'vergangener': -1,
76 'vorheriger': -1,
77 'prev': -1,
78 'letzter': -1,
79 'nächster': 1,
80 'dieser': 0,
81 'previous': -1,
82 'in a': 2,
83 'end of': 0,
84 'eod': 0,
85 'eo': 0,
86 }
87
88 # morgen/abermorgen does not work, see
89 # http://code.google.com/p/parsedatetime/issues/detail?id=19
90 dayOffsets = {
91 'morgen': 1,
92 'heute': 0,
93 'gestern': -1,
94 'vorgestern': -2,
95 'übermorgen': 2,
96 }
97
98 # special day and/or times, i.e. lunch, noon, evening
99 # each element in the dictionary is a dictionary that is used
100 # to fill in any value to be replace - the current date/time will
101 # already have been populated by the method buildSources
102 re_sources = {
103 'mittag': {'hr': 12, 'mn': 0, 'sec': 0},
104 'mittags': {'hr': 12, 'mn': 0, 'sec': 0},
105 'mittagessen': {'hr': 12, 'mn': 0, 'sec': 0},
106 'morgen': {'hr': 6, 'mn': 0, 'sec': 0},
107 'morgens': {'hr': 6, 'mn': 0, 'sec': 0},
108 'frühstück': {'hr': 8, 'mn': 0, 'sec': 0},
109 'abendessen': {'hr': 19, 'mn': 0, 'sec': 0},
110 'abend': {'hr': 18, 'mn': 0, 'sec': 0},
111 'abends': {'hr': 18, 'mn': 0, 'sec': 0},
112 'mitternacht': {'hr': 0, 'mn': 0, 'sec': 0},
113 'nacht': {'hr': 21, 'mn': 0, 'sec': 0},
114 'nachts': {'hr': 21, 'mn': 0, 'sec': 0},
115 'heute abend': {'hr': 21, 'mn': 0, 'sec': 0},
116 'heute nacht': {'hr': 21, 'mn': 0, 'sec': 0},
117 'feierabend': {'hr': 17, 'mn': 0, 'sec': 0},
118 }