[3729] in SIPB bug reports

home help back first fref pref prev next nref lref last post

omer output misformatted at sunset (patch included)

daemon@ATHENA.MIT.EDU (mhpower@Athena.MIT.EDU)
Sun May 9 20:46:35 1993

From: mhpower@Athena.MIT.EDU
To: bug-sipb@Athena.MIT.EDU
Date: Sun, 09 May 93 20:46:14 EDT

% hostname
snorkelwacker
% where omer
/usr/sipb/rtbin/omer
% ls -l /usr/sipb/rtbin/omer
-rwxr-xr-x  1 jik          4032 May  1  1992 /usr/sipb/rtbin/omer

% omer
Today is May 9, 1993.
Sunset is at 19:52 local time, Before sunset, the Hebrew date is 18 Iyar 5753, which is day number 33,
        comprising 4 weeks and 5 days of the Omer.
After sunset, the Hebrew date is 19 Iyar 5753, which is day number 34,
        comprising 4 weeks and 6 days of the Omer.

[... a little later...]

% omer
Today is May 9, 1993.
Sunset is at 19:52 local time, which was 0 hours and 6 minutes ago.
Before sunset, the Hebrew date is 18 Iyar 5753, which is day number 33,
        comprising 4 weeks and 5 days of the Omer.
After sunset, the Hebrew date is 19 Iyar 5753, which is day number 34,
        comprising 4 weeks and 6 days of the Omer.


It doesn't seem to handle the case "$sunset_difference == 0" very
well. The second sentence of the output ends up terminated with a
comma rather than a period. I think the patch below should fix this.

Matt


*** omer.old	Sun May  9 19:55:25 1993
--- omer	Sun May  9 20:04:50 1993
***************
*** 146,151 ****
--- 146,154 ----
  	   $sunset_difference % 60,
  	   ($sunset_difference % 60 == 1) ? "" : "s");
  }
+ else {
+     print "which is the current time.\n";
+ }
  
  if ($day_of_omer) {
      printf("Before sunset, the Hebrew date is %s, which is day number %d,\n\tcomprising %s of the Omer.\n", 

home help back first fref pref prev next nref lref last post