wordpress-mobile / release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Mozilla Public License 2.0
5 stars 2 forks source link

Update NextReleaseDate util to display the correct date #159

Closed derekblank closed 11 months ago

derekblank commented 11 months ago

Updates the CLI NextReleaseDate util to display the correct next release date:

To test:

Run go run main.go render checklist -v 1.0.0 from the cli directory, and verify that the date output in the Hey [author] quote is the correct date for next Thursday:

Hey [author]. We will cut the 1.0.0 release on Thursday October 12, 2023. I plan to circle back and bump this PR...

I believe the original issue was because the first Monday in January 2006 was January the 2nd, not January the 1st:

- return nextThursday.Format("Monday 01, 2006")
+ return nextThursday.Format("Monday January 2, 2006")

I also added the month, which I though should be included. Previously, the command would render "We will cut the release on Thursday 10, 2023", which felt a bit odd without the name of month included. Also updated the test to reflect this.