Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Lithuanian language date and time localization #367

Closed
wants to merge 1 commit into from

2 participants

@frgtn

Lithuanian language date and time format localization, based on Lithuanian language style guidelines published by Microsoft.

Note: Lithuanian language uses alt. month names in most date formats. Correct translations are yet to be merged from Transifex project.

@frgtn

It doesn't hurt to stay permissive on the input side.

@aaugustin
Owner

The official docs now point to https://github.com/simukis/django-localflavor-lt.

This pull request isn't needed any longer since the localflavor packages were split out of Django.

Thanks for your contribution!

@aaugustin aaugustin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 10, 2012
  1. @frgtn
This page is out of date. Refresh to see the latest.
Showing with 29 additions and 12 deletions.
  1. +29 −12 django/conf/locale/lt/formats.py
View
41 django/conf/locale/lt/formats.py
@@ -4,20 +4,37 @@
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
-DATE_FORMAT = r'Y \m. F j \d.'
-TIME_FORMAT = 'H:i:s'
-# DATETIME_FORMAT =
-# YEAR_MONTH_FORMAT =
-# MONTH_DAY_FORMAT =
-SHORT_DATE_FORMAT = 'Y.m.d'
-# SHORT_DATETIME_FORMAT =
-# FIRST_DAY_OF_WEEK =
+DATE_FORMAT = r'Y \m. E j \d.' # '2006 m. spalio 25 d.'
+TIME_FORMAT = 'H:i' # '14:30'
+DATETIME_FORMAT = r'Y \m. E j \d. H:i' # '2006 m. spalio 25 d. 14:30'
+YEAR_MONTH_FORMAT = r'Y F' # '2006 spalis'
+MONTH_DAY_FORMAT = r'E j' # 'spalio 25'
+SHORT_DATE_FORMAT = 'Y-m-d' # '2006-10-25'
+SHORT_DATETIME_FORMAT = 'Y-m-d H:i' # '2006-10-25 14:30'
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
-# DATE_INPUT_FORMATS =
-# TIME_INPUT_FORMATS =
-# DATETIME_INPUT_FORMATS =
+DATE_INPUT_FORMATS = (
+ '%Y-%m-%d', # '2006-10-25'
+ '%Y %m %d', # '2006 10 25'
+ '%Y.%m.%d', # '2006.10.25'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%Y %m %d %H:%M:%S', # '2006 10 25 14:30:59'
+ '%Y %m %d %H:%M', # '2006 10 25 14:30'
+ '%Y %m %d', # '2006 10 25'
+ '%Y.%m.%d %H:%M:%S', # '2006.10.25 14:30:59'
+ '%Y.%m.%d %H:%M', # '2006.10.25 14:30'
+ '%Y.%m.%d', # '2006.10.25'
+)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ' '
# NUMBER_GROUPING =
Something went wrong with that request. Please try again.