[Hejes-devel] [1691] dates: new date format (interval)
hejes-devel at nytud.hu
hejes-devel at nytud.hu
Wed Feb 1 13:15:09 CET 2017
Revision: 1691
Author: ludanyizs
Date: 2017-02-01 13:15:09 +0100 (Wed, 01 Feb 2017)
Log Message:
-----------
dates: new date format (interval)
Modified Paths:
--------------
trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py
Modified: trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py
===================================================================
--- trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py 2016-12-06 13:55:07 UTC (rev 1690)
+++ trunk/web2py/applications/helyesiras_webdev/modules/keltezes.py 2017-02-01 12:15:09 UTC (rev 1691)
@@ -35,7 +35,7 @@
if len(day) == 1: day = '0'+day
out.append([year + ". " + month + ". " + day + ".", ["AkH11-293", "AkH12-295"]])
if len(year) < 4: year = ((4 - len(year)) * '0') + year
- out.append([year + "-" + month + "-" + day, ["AkH11-293", "AkH12-295"]])
+ #out.append([year + "-" + month + "-" + day, ["AkH11-293", "AkH12-295"]])
return out
#~ kimenet 2:
@@ -88,6 +88,19 @@
else:
out.append([year + ". " + listOfMonths[int(month)-1][0] + " " + day + "–" + str(int(day)+1) + ".", ['AkH11-263', 'AkH12-264']])
+ #~ 2017. január 31. -- február 28.
+ if int(month) == 12:
+ out.append([year + ". " + listOfMonths[int(month)-1][0] + " " + day + ". - " + str(int(year)+1) + ". " + listOfMonths[0][0] + " 28.", ['AkH12-296']])
+ out.append([year + ". " + listOfMonths[int(month)-1][2] + " " + day + ". - " + str(int(year)+1) + ". " + listOfMonths[0][2] + " 28.", ['AkH12-296']])
+ else:
+ out.append([year + ". " + listOfMonths[int(month)-1][0] + " " + day + ". - " + listOfMonths[int(month)][0] + " 28.", ['AkH12-296']])
+ out.append([year + ". " + listOfMonths[int(month)-1][2] + " " + day + ". - " + listOfMonths[int(month)][2] + " 28.", ['AkH12-296']])
+
+ #~ 2017. január 31. -- 2018. február 28.
+ if int(month) != 12:
+ out.append([year + ". " + listOfMonths[int(month)-1][0] + " " + day + ". - " + str(int(year)+1) + ". " + listOfMonths[0][0] + " 28.", ['AkH12-296']])
+ out.append([year + ". " + listOfMonths[int(month)-1][2] + " " + day + ". - " + str(int(year)+1) + ". " + listOfMonths[0][2] + " 28.", ['AkH12-296']])
+
#~ 2011. novemberi:
out.append([year + ". " + listOfMonths[int(month)-1][0] + "i", ["AkH11-294", "AkH12-296"]])
@@ -137,7 +150,9 @@
out.append([year + ' folyamán', ['AkH11-295', 'AkH12-297']])
if YEAR_bAn.match(year): out.append([year + '-ban', ['AkH11-296', 'AkH12-298']])
else: out.append([year + '-ben', ['AkH11-296', 'AkH12-298']])
+
+
return out
listOfMonths = [
More information about the Hejes-devel
mailing list