This module allows you to store a single date in the database, while displaying any offset of that date to your users. Rather than needing extra date fields to store/display this information, you can simply apply the display format and specify your desired offset for a stored date.
Use this module in the same way you would any other formatting module.
Project Page: https://www.drupal.org/sandbox/nlatoni/2444415
Setting up repository for the first time
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/nlatoni/2444415.git date_period_offset
cd date_period_offset
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxnlatoni2444415git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
davidsheart02 commentedI've resolved all errors reported by automated review tools. Ready for another review.
Comment #3
saurabh.tripathi.cs commentedHi ,
I tried to clone this on my local. It is asking for password and not getting authenticated by my drupal.org password.
Issue:
saurabh@saurabh:~$ git clone --branch 7.x-1.x nlatoni@git.drupal.org:sandbox/nlatoni/2444415.git offset_date
Cloning into 'offset_date'...
nlatoni@git.drupal.org's password:
Permission denied, please try again.
fatal: Could not read from remote repository.
Please ensure you have given correct git repository link.Follow instructions:
You can find the correct git clone command for your sandbox by clicking on the Version control tab, removing the checkbox in front of "Maintainer", and clicking Show. You can then copy-paste the git clone command from the codeblock below "Setting up repository for the first time".
Reference : https://www.drupal.org/node/1011698.
Comment #4
davidsheart02 commentedUpdated to include correct git clone command
Comment #5
mlmoseley commentedFirst off, I'm not seeing a formatter in 'Manage Display, ' so the module is not working for me.
Individual user account
Yes
No duplication
Yes
Master Branch
Yes
Licensing
No. The GNU public license is not included.
3rd party assets/code
Yes
README.txt/README.md
No. The readme does not sufficiently explain how to use the module and does not follow the guidelines for README's. Explain specifically how to use the module. See the readme template here: https://www.drupal.org/node/2181737
Code long/complex enough for review
No. It has only four function definitions and the guidelines call for five, but I'm not sure if this is a hard and fast rule. Read the guidelines here: https://groups.drupal.org/node/195848
Secure code
Yes
Coding style & Drupal API usage
It looks good to me, except that the module doesn't work. And it passes coder review.
Comment #6
davidsheart02 commented@mlmoseley Thank you for your review. I'm surprised by your comment that the module doesn't work for you. I assume you downloaded and enabled the module just like any other drupal module. Did you then go to a content type containing a date field and manage that field's display? At that point you would see the "Offset Date" option in the drop down menu. You will not see it if you are not looking at a date field. Hence the requirement for the date module.
Could you be more specific about the steps you took to test this?
Comment #7
mlmoseley commentedTake a look at this video clip of my setup, and tell me if I'm using the module incorrectly or looking in the wrong place. Note: I'm using PHP 5.3.2, which is supported in D7, but which is older, and that may be the problem..
https://dl.dropboxusercontent.com/u/49576796/offset.mov
Comment #8
davidsheart02 commented@mlmoseley Thanks for testing. I'm not exactly sure what I'm looking at in your video, but I did uncover some things that weren't working correctly. I've updated the module and am ready for more testing to occur.
Comment #9
mlmoseley commentedWhat you're looking at is me showing you the module is enabled, and then showing you that no controls for off-setting the date appear near the 'Manage Display' field for a date field.
As to how I configured the site, I created a standard D7 site using drush, installed your module and it's dependencies, added a date field to a content type, and then looked for the offset UI in the 'Manage Display' field for that date field, and did not see it.
Comment #10
jasonrichardsmith@gmail.com commentedI have just tested this module. The field formatter is listed as an option and it appears to work as expected.
Comment #11
jasonrichardsmith@gmail.com commentedI would move this to RTBC, but I work with Nathaniel and coached him one writing the module, so I feel that would be unethical.
Comment #12
stefan.r commentedOther than the remarks below this is RTBC as far as I am concerned.
Automated Review
Review of the 7.x-1.x branch (commit c525005):
Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
FILE: /var/www/drupal-7-pareview/pareview_temp/offset_date.module
---------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------
88 | WARNING | Only string literals should be passed to t() where
| | possible
105 | ERROR | Expected "if (...) {\n"; found "if(...){\n"
---------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/README.txt
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
24 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Manual Review
Nitpicks:
4 dashes too much
Nitpicks:
This review uses the Project Application Review Template.
Comment #13
davidsheart02 commentedAll review comments from https://www.drupal.org/node/2444455#comment-9738363 have been addressed. Thank you for the thorough review. Please move to RTBC if agreed that all issues have been addressed.
Comment #14
davidsheart02 commentedComment #15
stefan.r commentedOK looks good. Consider getting a review bones so someone can do a final review!
Comment #16
davidsheart02 commentedThanks Stefan. Looking forward to seeing this released!
Comment #17
cweagansThanks for your contribution!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #18
davidsheart02 commentedThanks @cweagans!