Merge pull request '[I107] Fix calculation of the days until next available episode timeslot' (#108) from I107_Error-generating-next-available-episode into main

Reviewed-on: rho_n/hpr_generator#108
This commit is contained in:
Roan Horning 2023-05-18 13:09:18 +00:00
commit 7dca1d75cb
3 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@
%--> %-->
<!--% USE date %--> <!--% USE date %-->
<!--% calc = date.calc %--> <!--% calc = date.calc %-->
<!--% days_till_next_episode = calc.Delta_Days(date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d'),next_available_episode_result.last_year,next_available_episode_result.last_month,next_available_episode_result.last_day + 1) %--> <!--% days_till_next_episode = calc.Delta_Days(date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d'),next_available_episode_result.last_year,next_available_episode_result.last_month,next_available_episode_result.last_day) %-->
<!--% END %--> <!--% END %-->
<!--% USE date %--> <!--% USE date %-->
<!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %--> <!--% delta = date.calc.N_Delta_YMD(2005,9,19, date.format(date.now, '%Y'),date.format(date.now, '%m'),date.format(date.now, '%d')) %-->

View File

@ -6,9 +6,9 @@
) )
SELECT SELECT
MIN(next_id.id_next) AS \'next_id\', MIN(next_id.id_next) AS \'next_id\',
DATE_FORMAT(MIN(last_date), \'%Y\') AS \'last_year\', DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%Y\') AS \'last_year\',
DATE_FORMAT(MIN(last_date), \'%d\') AS \'last_day\', DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%d\') AS \'last_day\',
DATE_FORMAT(MIN(last_date), \'%m\') AS \'last_month\' DATE_FORMAT(DATE_ADD(MIN(last_date), INTERVAL 1 DAY), \'%m\') AS \'last_month\'
FROM next_id FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL WHERE eps.id IS NULL

View File

@ -6,9 +6,9 @@
) )
SELECT SELECT
MIN(next_id.id_next) AS \'next_id\', MIN(next_id.id_next) AS \'next_id\',
strftime(\'%Y\', MIN (last_date)) AS \'last_year\', strftime(\'%Y\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_year\',
strftime(\'%d\', MIN (last_date)) AS \'last_day\', strftime(\'%d\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_day\',
strftime(\'%m\', MIN (last_date)) AS \'last_month\' strftime(\'%m\', DATE (MIN (last_date), \'+1 Days\')) AS \'last_month\'
FROM next_id FROM next_id
LEFT JOIN eps ON next_id.id_next = eps.id LEFT JOIN eps ON next_id.id_next = eps.id
WHERE eps.id IS NULL WHERE eps.id IS NULL