Closed (fixed)
Project:
Birthdays
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2011 at 19:27 UTC
Updated:
13 Dec 2011 at 14:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
Niklas Fiekas commentedWith pleasure - that would be super awesome. Just note that we must also be able to parse it correctly.
Comment #2
afeijoHere it is my first patch, ongoing work
I'll finish it tonight
Comment #3
afeijoHere it is my last changes ;)
Comment #5
Niklas Fiekas commentedHere is a first in-depth review:
Trailing space.
As a German I have special intrest in dd.mm.yy.
Of course those shouldn't be in the final version. (Btw: dsm in depracted in favor of dpm.)
As discussed, this should be a select widget.
The description will be changed anyway. Out of intrest: What would aa be?
I changed this to Run cron at most once a day. in another commit. Thanks thanks for spotting this ;)
I suggested the default value myself. Maybe yy/mm/dd is a better one, because we're using that above.
We should also decide if we use yy or yyyy in masks. I'd prefer yy. Example: yy/mm/dd matches 11/03/5 and should also match 2011/03/5, I think.
All comments should start with a capital letter and have a trailing . (dot).
Indent switch(...) statements like this:
Here is a problem: 11/11/11/1/2/3 shouldn't be accepted as a valid date.
Trailing spaces.
No break; after return;
Trailing space.
Trailing space.
Trailing spaces.
Can we convert this to case-branches of the switch(...) statement above?
We must make use of the new $mask argument there: https://github.com/niklasf/birthdays/blob/7.x-1.x/birthdays.module#L263.
Other than those details it's pretty good. Thank you so much for working on this.
Update: I forgot that we will also need a $mask parameter for toString().
Comment #6
Skispcs commentedWill this change allow the Birthdays Module to select a Date Format?
I would like to be able to create a new custom format and have the Birthdays module use that format in all locations.
Comment #7
Niklas Fiekas commentedAlmost: It will allow you to choose any date format you want for displaying the birthday - however the one on the edit pages is a little more strict and only uses certain date formats (for now) - you can select from a list. Which date format do you need?
Comment #8
Skispcs commentedThank you for the response.
I would like a format that is Month Day, without the year.
e.g. Dec 10 for 10 December.
Comment #9
afeijo@Skispcs
Yes, it will work as you need
Comment #10
Skispcs commentedSo currently I need to create a custom Date Format of Mon Day.
Then go to Date and Time and set the Medium Date format to the new custom format.
Then the birthdays module is hardcoded to use the medium format?
I would hope that soon you could choose a custom date format instead of being forced to use medium which impacts all other modules and/or functionality which depends on that format.
Please let me know if I am not understanding correctly.
Comment #11
afeijoMy new code changes it, we wont be using the Drupal date format any longer
Instead, we'll have a
with 3 dateformats: yy/mm/dd, dd/mm/yy, mm/dd/yy
And with the current option to use or remove the year part, you can have it as you plan: mm/dd
That is for the Node Edit page - Edit Field with or without the Datepicker, to the Node View page, we could still integrate with the Drupal dateformats; a custom one perhaps? or let the user input the php date() format?
I will speed up my code, couldn't work on it in the past week
Comment #12
Niklas Fiekas commentedMerged in #1355268: Weekday added to date format, making it invalid.
Comment #13
Niklas Fiekas commentedCommitted http://drupalcode.org/project/birthdays.git/commitdiff/0f5ed19 with a few coding style fixes. I think we can release it after solving #1355810: Regression: Entering a year is no longer optional caused by this.