Skip to content

Commit 0bb5b11

Browse files
committed
Good Friday Correction
1 parent 027c23a commit 0bb5b11

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

FishFryCountdown/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
var AshWednesdayresults = "Ash Wednesday " + cy + " is on " + month + " " + day;
7070
document.getElementById("AshWednesday").innerHTML = AshWednesdayresults;
7171

72-
var AshWednesdaytargettime = month + " " + day + " " + cy + " 16:00:00 GMT-0500";
73-
var targettime = month + " " + day + " " + cy + " 16:00:00 GMT-0500";
72+
var AshWednesdaytargettime = month + " " + day + " " + cy;
73+
var targettime = month + " " + day + " " + cy;
7474
//alert(targettime);
7575
//var label = "AshWednesday";
7676
//document.getElementById(label).innerHTML = results;
@@ -97,7 +97,7 @@
9797
message[0] = "Fish Fry Starts in:";
9898
message[1] = "Fish Fry has started:";
9999
message[2] = "Fish Fry Starts Next Year on Ash Wednesday " ;
100-
message[3] = "Last Fish Fry of the yeat";
100+
message[3] = "Last Fish Fry of the year";
101101
document.getElementById("message").innerHTML = message[fishfrystatus];
102102

103103
if (fishfrystatus === 0)

FishFryCountdown/js/CurrentYear.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,20 @@ function FishFryStatus(ashwednesday, goodfriday)
7171
{
7272
var rc = 0;
7373
days = 0;
74-
75-
var t = addDays(new Date(), days);
76-
77-
var tt = Date.parse(t);
74+
//alert(ashwednesday + " " + goodfriday);
75+
var t = addDays(new Date(), days);
76+
//alert(t);
77+
//alert(getMonth(t.getDate()+1));
78+
var currentday = getMonth(t.getDate()+1) + " " + t.getDate()+ " " + t.getFullYear();
79+
//alert(currentday+ " " +ashwednesday + " " + goodfriday);
80+
81+
var tt = Date.parse(t);
7882
//alert(tt);
7983
var at = Date.parse(ashwednesday);
8084
//alert(at);
8185
var gf = Date.parse(goodfriday);
82-
//alert(t + " " + tt + " " + at + " " + gf);
86+
//alert(tt - gf);
87+
//alert(t + " " + tt + " " + at + " " + gf );
8388
if ((tt >= at) && (tt < gf))
8489
{
8590
rc = 1;
@@ -91,11 +96,11 @@ function FishFryStatus(ashwednesday, goodfriday)
9196
var cy = d.getFullYear() + 1;
9297
nextyeardates(cy);
9398
}
94-
if (tt === gf)
99+
if (currentday === goodfriday)
95100
{
96101
rc = 3;
97102
}
98-
alert(rc);
103+
//alert(rc);
99104
return rc;
100105
}
101106
function addDays(date, days) {

0 commit comments

Comments
 (0)