[PR #457] [MERGED] Making NASA APOD module date safe #826

Closed
opened 2026-02-25 21:36:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/457
Author: @kmpoppe
Created: 3/5/2021
Status: Merged
Merged: 3/10/2021
Merged by: @jasonmunro

Base: masterHead: update-nasa-module


📝 Commits (1)

  • 9e2bfc4 Making NASA APOD questions date safe

📊 Changes

1 file changed (+35 additions, -8 deletions)

View changed files

📝 modules/nasa/modules.php (+35 -8)

📄 Description

Pullrequest

The module now

  • calculates "today" at NASA HQ's timezone
  • has min/max dates in date-picker control (browser may not support these, but they do no harm)
  • min date is 1995-06-16, the day of the first APOD
  • 1995-06-17, 18 & 19 are excluded from prev/next buttons because there are no pictures for these three days in the 25+ year history of APOD.
  • whether there is a "next" button (+ max date in picker) is now also determined by NASA HQ's timezone.

Issues

Checklist

  • None

How2Test

  • Open the APOD page between 12am and 6am CET (11pm and 5am UTC) and check that a) a picture is displayed at all, b) the picture is of the correct date ("previous day" seen from CET's day) and c) no "Next" link is displayed.
  • Check the date picker does not allow to pick a day before June 16th 1995 and Prev/Next links do not allow to move to June 17, 18 or 19 1995. If any of these three days is chosen from the date picker it should say Could not find a picture for the requested day.

Todo

  • None

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/457 **Author:** [@kmpoppe](https://github.com/kmpoppe) **Created:** 3/5/2021 **Status:** ✅ Merged **Merged:** 3/10/2021 **Merged by:** [@jasonmunro](https://github.com/jasonmunro) **Base:** `master` ← **Head:** `update-nasa-module` --- ### 📝 Commits (1) - [`9e2bfc4`](https://github.com/cypht-org/cypht/commit/9e2bfc4179504140b82f2f3e0f5bf41b5c4dda3c) Making NASA APOD questions date safe ### 📊 Changes **1 file changed** (+35 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `modules/nasa/modules.php` (+35 -8) </details> ### 📄 Description ## Pullrequest The module now * calculates "today" at NASA HQ's timezone * has min/max dates in date-picker control (browser may not support these, but they do no harm) * min date is 1995-06-16, the day of the first APOD * 1995-06-17, 18 & 19 are excluded from prev/next buttons because there are no pictures for these three days in the 25+ year history of APOD. * whether there is a "next" button (+ max date in picker) is now also determined by NASA HQ's timezone. ### Issues - Relates nasa/apod-api#48 ### Checklist - [X] None ### How2Test - [ ] Open the APOD page between 12am and 6am CET (11pm and 5am UTC) and check that a) a picture is displayed at all, b) the picture is of the correct date ("previous day" seen from CET's day) and c) no "Next" link is displayed. - [ ] Check the date picker does not allow to pick a day before June 16th 1995 and Prev/Next links do not allow to move to June 17, 18 or 19 1995. If any of these three days is chosen from the date picker it should say **Could not find a picture for the requested day**. ### Todo - [X] None --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:36:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#826
No description provided.