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

Rationalise date formatting #18805

Merged
merged 1 commit into from
Oct 21, 2020
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Oct 20, 2020

Overview

Rationalise date formatting

Before

Various places hard code the date format - ie

CRM_Utils_Date::customFormat($membershipOb->end_date, '%B %E%f, %Y')

After

simpler syntax that (I think) makes the formatting taking place clearer (along with code comments) CRM_Utils_Date::formatDateOnlyLong($membershipOb->start_date)

Technical Details

This came out of discovering a place in the code was 'accidentally formatted correctly'
and finding it far too hard to figure out the right way to specify the date formatting -
something that seems confirmed by finding various places with hard-coded date formatting
rather than using the setting

Comments

There are some other places that aren't hard-coding but could be switched over

Screen Shot 2020-10-20 at 2 57 55 PM

@civibot
Copy link

civibot bot commented Oct 20, 2020

(Standard links)

@civibot civibot bot added the master label Oct 20, 2020
@seamuslee001
Copy link
Contributor

This came out of discovering a place in the code was 'accidentally formatted correctly'
and finding it far too hard to figure out the right way to specify the date formatting -
something that seems confirmed by finding various places with hard-coded date formattin
rather than using the setting
@eileenmcnaughton
Copy link
Contributor Author

Test should be fixed now...

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 it has passed now

@seamuslee001
Copy link
Contributor

Looks fine to me merging

@seamuslee001 seamuslee001 merged commit eba889b into civicrm:master Oct 21, 2020
@seamuslee001 seamuslee001 deleted the date branch October 21, 2020 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants