Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement subset of strftime/strptime POSIX standard #29

Merged
merged 3 commits into from
Apr 1, 2014

Conversation

benfitzpatrick
Copy link
Contributor

This implements a subset of the Python datetime strftime/strptime
functionality. Some tokens have not been implemented due to
conflict with ISO 8601 interpretations (e.g. week day (%w), where
the strftime (US-derived) week starts on Sunday) or due to
locale/language dependencies.

@matthewrmshin, please review.

info = result.groupdict()
date_info_keys = [i[3] for i in parser_spec.get_date_translate_info(
self.expanded_year_digits)]
time_info_keys = [i[3] for i in parser_spec.get_time_translate_info()]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i[3] is a bit magical here.

@matthewrmshin
Copy link
Member

Tests OK in my environment. Some minor comments.

@benfitzpatrick
Copy link
Contributor Author

Done (and tested).

matthewrmshin added a commit that referenced this pull request Apr 1, 2014
Implement subset of strftime/strptime POSIX standard
@matthewrmshin matthewrmshin merged commit 8a894d8 into metomi:master Apr 1, 2014
@benfitzpatrick benfitzpatrick deleted the strftime_strptime branch April 1, 2014 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants