| 1 |
Description: Corrects bad comment format |
| 2 |
Author: Xavier Guimard <[email protected]> |
| 3 |
Bug: https://rt.cpan.org/Ticket/Display.html?id=91096 |
| 4 |
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=91096 |
| 5 |
Last-Update: 2013-12-01 |
| 6 |
|
| 7 |
--- libreligion-islam-prayertimes-perl-1.02.orig/lib/Religion/Islam/PrayerTimes.pm |
| 8 |
+++ libreligion-islam-prayertimes-perl-1.02/lib/Religion/Islam/PrayerTimes.pm |
| 9 |
@@ -1080,15 +1080,15 @@ my ($IshRt, $FajrRt); |
| 10 |
return ($IshRt, $FajrRt); |
| 11 |
} |
| 12 |
#========================================================== |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
+#=BH2GA |
| 23 |
+#Name: BH2GA |
| 24 |
+#Type: Procedure |
| 25 |
+#Purpose: Finds Gdate(year,month,day) for Hdate(year,month,day=1) |
| 26 |
+#Arguments: |
| 27 |
+#Input: Hijrah date: year:yh, month:mh |
| 28 |
+#Output: Gregorian date: year:yg, month:mg, day:dg , day of week:dayweek |
| 29 |
+# and returns flag found:1 not found:0 |
| 30 |
+#=cut |
| 31 |
# ($yg1, $mg1, $dg1, $dw2) = &BH2GA($yh2,$mh2); |
| 32 |
sub BH2GA{ |
| 33 |
my ($self, $yh, $mh) = @_; |
| 34 |
@@ -1111,14 +1111,14 @@ my ($yg, $mg, $dg, $dayweek); |
| 35 |
return ($flag, $yg, $mg, $dg, $dayweek); |
| 36 |
} |
| 37 |
#========================================================== |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
+#=HCalendarToJDA |
| 47 |
+#Name: HCalendarToJDA |
| 48 |
+#Type: Function |
| 49 |
+#Purpose: convert Hdate(year,month,day) to Exact Julian Day |
| 50 |
+#Arguments: |
| 51 |
+#Input : Hijrah date: year:yh, month:mh, day:dh |
| 52 |
+#Output: The Exact Julian Day: JD |
| 53 |
+#=cut |
| 54 |
# $GJD= &HCalendarToJDA($yh,$mh,1); |
| 55 |
sub HCalendarToJDA{ |
| 56 |
my ($self, $yh, $mh, $dh) = @_; |
| 57 |
@@ -1143,15 +1143,15 @@ my ($self, $yh, $mh, $dh) = @_; |
| 58 |
return $GJD; |
| 59 |
} |
| 60 |
#========================================================== |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
+#=HMonthLength |
| 71 |
+#Name: HMonthLength |
| 72 |
+#Type: Function |
| 73 |
+#Purpose: Obtains the month length |
| 74 |
+#Arguments: |
| 75 |
+#Input : Hijrah date: year:yh, month:mh |
| 76 |
+#Output: Month Length |
| 77 |
+#int HMonthLength(int yh,int mh) |
| 78 |
+#=cut |
| 79 |
sub HMonthLength{ |
| 80 |
my ($self, $yh, $mh) = @_; |
| 81 |
|
| 82 |
@@ -1177,15 +1177,15 @@ my ($self, $yh, $mh) = @_; |
| 83 |
return $Dy; |
| 84 |
} |
| 85 |
#========================================================== |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
+#=DayInYear |
| 96 |
+#Name: DayInYear |
| 97 |
+#Type: Function |
| 98 |
+#Purpose: Obtains the day number in the yea |
| 99 |
+#Arguments: |
| 100 |
+#Input : Hijrah date: year:yh, month:mh day:dh |
| 101 |
+#Output: Day number in the Year |
| 102 |
+#int DayinYear(int yh,int mh,int dh) |
| 103 |
+#=cut |
| 104 |
sub DayinYear{ |
| 105 |
my ($self, $yh, $mh, $dh) = @_; |
| 106 |
|
| 107 |
@@ -1214,15 +1214,15 @@ my ($self, $yh, $mh, $dh) = @_; |
| 108 |
return $DL; |
| 109 |
} |
| 110 |
#========================================================== |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
+#=HYearLength |
| 121 |
+#Name: HYearLength |
| 122 |
+#Type: Function |
| 123 |
+#Purpose: Obtains the year length |
| 124 |
+#Arguments: |
| 125 |
+#Input : Hijrah date: year:yh |
| 126 |
+#Output: Year Length |
| 127 |
+#int HYearLength(int yh) |
| 128 |
+#=cut |
| 129 |
sub HYearLength{ |
| 130 |
my ($self, $yh) = @_; |
| 131 |
|
| 132 |
@@ -1252,16 +1252,16 @@ my ($self, $yh) = @_; |
| 133 |
} |
| 134 |
|
| 135 |
#========================================================== |
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
+#=G2HA |
| 147 |
+#Name: G2HA |
| 148 |
+#Type: Procedure |
| 149 |
+#Purpose: convert Gdate(year,month,day) to Hdate(year,month,day) |
| 150 |
+#Arguments: |
| 151 |
+#Input: Gregorian date: year:yg, month:mg, day:dg |
| 152 |
+#Output: Hijrah date: year:yh, month:mh, day:dh, day of week:dayweek |
| 153 |
+# and returns flag found:1 not found:0 |
| 154 |
+#int G2HA(int yg,int mg, int dg,int *yh,int *mh,int *dh,int *dayweek) |
| 155 |
+#=cut |
| 156 |
sub G2HA{ |
| 157 |
my ($self, $yg, $mg, $dg) = @_; |
| 158 |
my ($yh, $mh, $dh, $dayweek); |
| 159 |
@@ -1306,17 +1306,17 @@ my ($yh, $mh, $dh, $dayweek); |
| 160 |
return ($flag, $yh, $mh, $dh, $dayweek); |
| 161 |
} |
| 162 |
#========================================================== |
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
+#=H2GA |
| 175 |
+#Name: H2GA |
| 176 |
+#Type: Procedure |
| 177 |
+#Purpose: convert Hdate(year,month,day) to Gdate(year,month,day) |
| 178 |
+#Arguments: |
| 179 |
+#Input/Ouput: Hijrah date: year:yh, month:mh, day:dh |
| 180 |
+#Output: Gregorian date: year:yg, month:mg, day:dg , day of week:dayweek |
| 181 |
+# and returns flag found:1 not found:0 |
| 182 |
+#Note: The function will correct Hdate if day=30 and the month is 29 only |
| 183 |
+#int H2GA(int *yh,int *mh,int *dh, int *yg,int *mg, int *dg,int *dayweek) |
| 184 |
+#=cut |
| 185 |
sub H2GA{ |
| 186 |
my ($self, $yh, $mh, $dh, $yg, $mg, $dg, $dayweek) = @_; |
| 187 |
|
| 188 |
@@ -1349,15 +1349,15 @@ my ($self, $yh, $mh, $dh, $yg, $mg, $dg, |
| 189 |
return ($found, $yg, $mg, $dg, $dayweek); |
| 190 |
} |
| 191 |
#========================================================== |
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
+#=JDToGCalendar |
| 202 |
+#Name: JDToGCalendar |
| 203 |
+#Type: Procedure |
| 204 |
+#Purpose: convert Julian Day to Gdate(year,month,day) |
| 205 |
+#Arguments: |
| 206 |
+#Input: The Julian Day: JD |
| 207 |
+#Output: Gregorian date: year:yy, month:mm, day:dd |
| 208 |
+#double JDToGCalendar(double JD, int *yy,int *mm, int *dd) |
| 209 |
+#=cut |
| 210 |
# (undef, $yg, $mg, $dg) = &JDToGCalendar($GJD); |
| 211 |
sub JDToGCalendar{ |
| 212 |
my ($self, $JD) = @_; |
| 213 |
@@ -1392,15 +1392,15 @@ my ($D, $Z); |
| 214 |
return ($F, $yy, $mm, $dd); |
| 215 |
} |
| 216 |
#========================================================== |
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
+#=GCalendarToJD |
| 227 |
+#Name: GCalendarToJD |
| 228 |
+#Type: Function |
| 229 |
+#Purpose: convert Gdate(year,month,day) to Julian Day |
| 230 |
+#Arguments: |
| 231 |
+#Input : Gregorian date: year:yy, month:mm, day:dd |
| 232 |
+#Output: The Julian Day: JD |
| 233 |
+#double GCalendarToJD(int yy,int mm, double dd) |
| 234 |
+#=cut |
| 235 |
|
| 236 |
sub GCalendarToJD{ |
| 237 |
my ($self, $yy, $mm, $dd) = @_; |
| 238 |
@@ -1425,15 +1425,15 @@ my ($T1, $T2, $Tr); |
| 239 |
return (int $Tr); |
| 240 |
} |
| 241 |
#========================================================== |
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
+#=GLeapYear |
| 252 |
+#Name: GLeapYear |
| 253 |
+#Type: Function |
| 254 |
+#Purpose: Determines if Gdate(year) is leap or not |
| 255 |
+#Arguments: |
| 256 |
+#Input : Gregorian date: year |
| 257 |
+#Output: 0:year not leap 1:year is leap |
| 258 |
+#int GLeapYear(int year) |
| 259 |
+#=cut |
| 260 |
sub GLeapYear{ |
| 261 |
my ($self, $year) = @_; |
| 262 |
my ($T); |
| 263 |
@@ -1448,16 +1448,16 @@ my ($T); |
| 264 |
return ($T); |
| 265 |
} |
| 266 |
#========================================================== |
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
+#=GDateAjust |
| 278 |
+#Name: GDateAjust |
| 279 |
+#Type: Procedure |
| 280 |
+#Purpose: Adjust the G Dates by making sure that the month lengths |
| 281 |
+# are correct if not so take the extra days to next month or year |
| 282 |
+#Arguments: |
| 283 |
+#Input: Gregorian date: year:yg, month:mg, day:dg |
| 284 |
+#Output: corrected Gregorian date: year:yg, month:mg, day:dg |
| 285 |
+#void GDateAjust(int *yg,int *mg,int *dg) |
| 286 |
+#=cut |
| 287 |
sub GDateAjust{ |
| 288 |
my ($self, $yg, $mg, $dg) = @_; |
| 289 |
my ($dys); |
| 290 |
@@ -1519,15 +1519,15 @@ my ($dys); |
| 291 |
return ($yg, $mg, $dg); |
| 292 |
} |
| 293 |
#========================================================== |
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
+#=DayWeek |
| 304 |
+# The day of the week is obtained as |
| 305 |
+# Dy=(Julian+1)%7 |
| 306 |
+# Dy=0 Sunday |
| 307 |
+# Dy=1 Monday |
| 308 |
+# ... |
| 309 |
+# Dy=6 Saturday |
| 310 |
+#int DayWeek(long JulianD) |
| 311 |
+#=cut |
| 312 |
sub DayWeek{ |
| 313 |
my ($self, $JulianD) = @_; |
| 314 |
my ($Dy); |
| 315 |
@@ -1535,15 +1535,15 @@ my ($Dy); |
| 316 |
return ($Dy); |
| 317 |
} |
| 318 |
#========================================================== |
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
+#=HCalendarToJD |
| 329 |
+#Name: HCalendarToJD |
| 330 |
+#Type: Function |
| 331 |
+#Purpose: convert Hdate(year,month,day) to estimated Julian Day |
| 332 |
+#Arguments: |
| 333 |
+#Input : Hijrah date: year:yh, month:mh, day:dh |
| 334 |
+#Output: The Estimated Julian Day: JD |
| 335 |
+#double HCalendarToJD(int yh,int mh,int dh) |
| 336 |
+#=cut |
| 337 |
sub HCalendarToJD{ |
| 338 |
my ($self, $yh, $mh, $dh) = @_; |
| 339 |
my ($md, $yd); |
| 340 |
@@ -1556,15 +1556,15 @@ my ($self, $yh, $mh, $dh) = @_; |
| 341 |
return $yd; |
| 342 |
} |
| 343 |
#========================================================== |
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
+#=JDToHCalendar |
| 354 |
+#Name: JDToHCalendar |
| 355 |
+#Type: Procedure |
| 356 |
+#Purpose: convert Julian Day to estimated Hdate(year,month,day) |
| 357 |
+#Arguments: |
| 358 |
+#Input: The Julian Day: JD |
| 359 |
+#Output : Hijrah date: year:yh, month:mh, day:dh |
| 360 |
+#void JDToHCalendar(double JD,int *yh,int *mh,int *dh) |
| 361 |
+#=cut |
| 362 |
#Estimating the hijrah date from JD |
| 363 |
sub JDToHCalendar{ |
| 364 |
my ($self, $JD) = @_; |
| 365 |
@@ -1582,15 +1582,15 @@ my ($md, $yd); |
| 366 |
return ($yh, $mh, $dh); |
| 367 |
} |
| 368 |
#========================================================== |
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
+#=JDToHACalendar |
| 379 |
+#Name: JDToHACalendar |
| 380 |
+#Type: Procedure |
| 381 |
+#Purpose: convert Julian Day to Hdate(year,month,day) |
| 382 |
+#Arguments: |
| 383 |
+#Input: The Julian Day: JD |
| 384 |
+#Output : Hijrah date: year:yh, month:mh, day:dh |
| 385 |
+#void JDToHACalendar(double JD,int *yh,int *mh,int *dh) |
| 386 |
+#=cut |
| 387 |
sub JDToHACalendar{ |
| 388 |
my ($self, $JD) = @_; |
| 389 |
my ($yh, $mh, $dh); |