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

Additional Support for Date Time pattern formats #347

Merged
merged 2 commits into from Mar 3, 2016

Conversation

@sachinpali146
Copy link
Contributor

@sachinpali146 sachinpali146 commented Feb 13, 2016

No description provided.

@codecov-io
Copy link

@codecov-io codecov-io commented Feb 13, 2016

Current coverage is 83.36%

Merging #347 into master will not affect coverage as of 8ea75fb

@@            master    #347   diff @@
======================================
  Files           21      21       
  Stmts         3781    3781       
  Branches         0       0       
  Methods          0       0       
======================================
  Hit           3152    3152       
  Partial          0       0       
  Missed         629     629       

Review entire Coverage Diff as of 8ea75fb

Powered by Codecov. Updated on successful CI builds.

@codecov-io
Copy link

@codecov-io codecov-io commented Feb 13, 2016

Current coverage is 89.67%

Merging #347 into master will increase coverage by +0.01% as of b501a6c

@@            master    #347   diff @@
======================================
  Files           23      23       
  Stmts         3794    3796     +2
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           3402    3404     +2
  Partial          0       0       
  Missed         392     392       

Review entire Coverage Diff as of b501a6c

Powered by Codecov. Updated on successful CI builds.

@akx
Copy link
Member

@akx akx commented Feb 14, 2016

Can you remove the merge commit from this PR? It should be as easy as

git remote add upstream https://github.com/python-babel/babel.git
git fetch --all
git rebase upstream/master
@sachinpali146 sachinpali146 force-pushed the sachinpali146:master branch from 9acb7de to 8aacd89 Feb 14, 2016
width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[num]
context = {3: 'format', 4: 'format', 5: 'stand-alone'}[num]
width = {3: 'abbreviated', 4: 'wide', 5: 'narrow', 6: 'short'}[num]
if char == 'c':

This comment has been minimized.

@akx

akx Feb 17, 2016
Member

Can you add some sort of reference about the semantics of lower-case c using stand-alone context? It doesn't seem immediately obvious, esp. considering this is a format function...

This comment has been minimized.

@sachinpali146

sachinpali146 Feb 25, 2016
Author Contributor

@akx I screwed up the commit once again. Please help

@sachinpali146
Copy link
Contributor Author

@sachinpali146 sachinpali146 commented Feb 19, 2016

I will work on it on Monday

@gitmate-bot gitmate-bot added size/XXL and removed size/S labels Feb 25, 2016
@akx
Copy link
Member

@akx akx commented Feb 25, 2016

@sachinpali146:

doing

git fetch --all
git rebase upstream/master

seems to untangle the history enough.

You can then do git reset upstream/master to return to a state where all of your changes exist, but have not been committed yet.

@sachinpali146
Copy link
Contributor Author

@sachinpali146 sachinpali146 commented Feb 29, 2016

@akx Made some changes, please check

@@ -155,6 +160,28 @@ def test_local_day_of_week_standalone(self):
fmt = dates.DateTimeFormat(d, locale='bn_BD')
self.assertEqual('4', fmt['c']) # friday is first day of week

def test_pattern_day_of_week(self):
dt = datetime(2016,2,6)
fmt = dates.DateTimeFormat(dt, locale='en_US')

This comment has been minimized.

@akx

akx Feb 29, 2016
Member

I'd love to see the "local day of week" formats (e and c) being tested with a locale that has another start-of-week-day than en_US's Sunday.

Otherwise, this PR looks very good!

Added test cases and additional pattern for quarter format
Added test cases and additional pattern for Weekday format
@sachinpali146 sachinpali146 force-pushed the sachinpali146:master branch from dfbda78 to 4d93b22 Mar 1, 2016
@akx
Copy link
Member

@akx akx commented Mar 3, 2016

Nice work! Thanks @sachinpali146 :)

akx added a commit that referenced this pull request Mar 3, 2016
Additional Support for Date Time pattern formats
@akx akx merged commit 170187e into python-babel:master Mar 3, 2016
4 of 6 checks passed
4 of 6 checks passed
review/gitmate/commit GitMate is currently running the analysis for this commit.
Details
review/gitmate/manual This commit needs review.
Details
codecov/patch 100.00% of diff hit (target 80.00%)
Details
codecov/project 89.67% (+0.01%) compared to ee0e0c1 at 89.66%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.