jcal-zmanim 1.3.2 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -61,7 +61,7 @@ declare class Sedra {
61
61
  static getDayOnOrBefore(day_of_week: number, date: number): number;
62
62
  static getSedraOrder(year: number, israel: boolean): {
63
63
  firstSatInYear: number;
64
- sedraArray?: number[] | undefined;
64
+ sedraArray?: number[];
65
65
  year: number;
66
66
  israel: boolean;
67
67
  };
@@ -302,12 +302,28 @@ declare class jDate {
302
302
  static daysJMonth(year: number, month: number): number;
303
303
  /**Elapsed days since creation of the world until Rosh Hashana of the given year*/
304
304
  static tDays(year: number): number;
305
+ /**The index for the year type of the given year.
306
+ * IMPORTANT NOTE: Only works for years 5000 and after.
307
+ */
308
+ static yearType(year: number): {
309
+ isLeapYear: boolean;
310
+ dow: number;
311
+ isLongCheshvan: boolean;
312
+ isLongKislev: boolean;
313
+ daysInYear: number;
314
+ };
305
315
  /**number of days in the given Jewish Year.*/
306
316
  static daysJYear(year: number): number;
307
317
  /**Does Cheshvan for the given Jewish Year have 30 days?*/
308
318
  static isLongCheshvan(year: number): boolean;
309
319
  /**Does Kislev for the given Jewish Year have 29 days?*/
310
320
  static isShortKislev(year: number): boolean;
321
+ /**number of days in the given Jewish Year.*/
322
+ static daysJYear_(year: number): number;
323
+ /**Does Cheshvan for the given Jewish Year have 30 days?*/
324
+ static isLongCheshvan_(year: number): boolean;
325
+ /**Does Kislev for the given Jewish Year have 29 days?*/
326
+ static isShortKislev_(year: number): boolean;
311
327
  /**Does the given Jewish Year have 13 months?*/
312
328
  static isJdLeapY(year: number): boolean;
313
329
  /**number of months in Jewish Year.*/
@@ -569,9 +585,9 @@ declare class Utils {
569
585
  jdate: jDate;
570
586
  };
571
587
  /** Returns true if "thing" is either a string primitive or String object.*/
572
- static isString(thing: unknown): boolean;
588
+ static isString(thing: unknown): thing is string | String;
573
589
  /** Returns true if "thing" is either a number primitive or a Number object.*/
574
- static isNumber(thing: unknown): boolean;
590
+ static isNumber(thing: unknown): thing is number | Number;
575
591
  /** Returns true if "thing" is a Date object containing a valid date.*/
576
592
  static isValidDate(thing: unknown): boolean;
577
593
  /** Returns whether or not the given, array, string, or argument list contains the given item or substring.
@@ -766,6 +782,39 @@ declare const ZmanTypeIds: Readonly<{
766
782
  }>;
767
783
  /**
768
784
  * List of Zman Types. Used to acquire the Zmanim for a particular day.
785
+ *
786
+ * An array of objects representing different Zmanim (Jewish halachic times).
787
+ * Each object contains the following properties:
788
+ * - `id`: A unique identifier for the Zman.
789
+ * - `desc`: A description of the Zman in Hebrew.
790
+ * - `eng`: The English translation of the Zman.
791
+ * - `heb`: The Hebrew name of the Zman.
792
+ *
793
+ * The Zmanim included are:
794
+ * - Chatzos Layla (Midnight)
795
+ * - Alos Hashachar (Dawn) - 90 minutes
796
+ * - Alos Hashachar (Dawn) - 72 minutes
797
+ * - Taliss and Tefillin (36 minutes)
798
+ * - Sunrise at current elevation
799
+ * - Sunrise at sea level
800
+ * - Zman Krias Shma according to MG"A
801
+ * - Zman Krias Shma according to GR"A
802
+ * - Zman Tefilla according to MG"A
803
+ * - Zman Tefilla according to GR"A
804
+ * - Chatzos (Midday)
805
+ * - Mincha Gedola
806
+ * - Mincha Ketana
807
+ * - Plag HaMincha
808
+ * - Sunset at sea level
809
+ * - Sunset at current elevation
810
+ * - Nightfall (45 minutes after sunset)
811
+ * - Nightfall (50 minutes after sunset)
812
+ * - Rabbeinu Tam (72 minutes after sunset)
813
+ * - Rabbeinu Tam - Zmanios
814
+ * - Rabbeinu Tam - Zmanios MG"A
815
+ * - Candle lighting time
816
+ * - Stop eating Chometz
817
+ * - Destroy Chometz
769
818
  */
770
819
  declare const ZmanTypes: ZmanToShow[];
771
820
  /**
@@ -884,7 +933,7 @@ declare class ZmanimUtils {
884
933
  * @param {jDate} jdate
885
934
  * @param {Location} location
886
935
  */
887
- static getWhichDays(date: Date, jdate: jDate, location: Location): 0 | 1 | 2 | 4 | 8 | 32 | 16 | 64 | 128;
936
+ static getWhichDays(date: Date, jdate: jDate, location: Location): 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128;
888
937
  /**
889
938
  * Returns the zmanim necessary for showing basic shul notifications: chatzosHayom, chatzosHalayla, alos
890
939
  * @param {jDate|Date} date
@@ -905,7 +954,7 @@ declare class ZmanimUtils {
905
954
  */
906
955
  static getAllZmanim(date: jDate | Date, location: Location): {
907
956
  zmanType: ZmanToShow;
908
- time?: Time | undefined;
957
+ time?: Time;
909
958
  }[];
910
959
  }
911
960
 
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ declare class Sedra {
61
61
  static getDayOnOrBefore(day_of_week: number, date: number): number;
62
62
  static getSedraOrder(year: number, israel: boolean): {
63
63
  firstSatInYear: number;
64
- sedraArray?: number[] | undefined;
64
+ sedraArray?: number[];
65
65
  year: number;
66
66
  israel: boolean;
67
67
  };
@@ -302,12 +302,28 @@ declare class jDate {
302
302
  static daysJMonth(year: number, month: number): number;
303
303
  /**Elapsed days since creation of the world until Rosh Hashana of the given year*/
304
304
  static tDays(year: number): number;
305
+ /**The index for the year type of the given year.
306
+ * IMPORTANT NOTE: Only works for years 5000 and after.
307
+ */
308
+ static yearType(year: number): {
309
+ isLeapYear: boolean;
310
+ dow: number;
311
+ isLongCheshvan: boolean;
312
+ isLongKislev: boolean;
313
+ daysInYear: number;
314
+ };
305
315
  /**number of days in the given Jewish Year.*/
306
316
  static daysJYear(year: number): number;
307
317
  /**Does Cheshvan for the given Jewish Year have 30 days?*/
308
318
  static isLongCheshvan(year: number): boolean;
309
319
  /**Does Kislev for the given Jewish Year have 29 days?*/
310
320
  static isShortKislev(year: number): boolean;
321
+ /**number of days in the given Jewish Year.*/
322
+ static daysJYear_(year: number): number;
323
+ /**Does Cheshvan for the given Jewish Year have 30 days?*/
324
+ static isLongCheshvan_(year: number): boolean;
325
+ /**Does Kislev for the given Jewish Year have 29 days?*/
326
+ static isShortKislev_(year: number): boolean;
311
327
  /**Does the given Jewish Year have 13 months?*/
312
328
  static isJdLeapY(year: number): boolean;
313
329
  /**number of months in Jewish Year.*/
@@ -569,9 +585,9 @@ declare class Utils {
569
585
  jdate: jDate;
570
586
  };
571
587
  /** Returns true if "thing" is either a string primitive or String object.*/
572
- static isString(thing: unknown): boolean;
588
+ static isString(thing: unknown): thing is string | String;
573
589
  /** Returns true if "thing" is either a number primitive or a Number object.*/
574
- static isNumber(thing: unknown): boolean;
590
+ static isNumber(thing: unknown): thing is number | Number;
575
591
  /** Returns true if "thing" is a Date object containing a valid date.*/
576
592
  static isValidDate(thing: unknown): boolean;
577
593
  /** Returns whether or not the given, array, string, or argument list contains the given item or substring.
@@ -766,6 +782,39 @@ declare const ZmanTypeIds: Readonly<{
766
782
  }>;
767
783
  /**
768
784
  * List of Zman Types. Used to acquire the Zmanim for a particular day.
785
+ *
786
+ * An array of objects representing different Zmanim (Jewish halachic times).
787
+ * Each object contains the following properties:
788
+ * - `id`: A unique identifier for the Zman.
789
+ * - `desc`: A description of the Zman in Hebrew.
790
+ * - `eng`: The English translation of the Zman.
791
+ * - `heb`: The Hebrew name of the Zman.
792
+ *
793
+ * The Zmanim included are:
794
+ * - Chatzos Layla (Midnight)
795
+ * - Alos Hashachar (Dawn) - 90 minutes
796
+ * - Alos Hashachar (Dawn) - 72 minutes
797
+ * - Taliss and Tefillin (36 minutes)
798
+ * - Sunrise at current elevation
799
+ * - Sunrise at sea level
800
+ * - Zman Krias Shma according to MG"A
801
+ * - Zman Krias Shma according to GR"A
802
+ * - Zman Tefilla according to MG"A
803
+ * - Zman Tefilla according to GR"A
804
+ * - Chatzos (Midday)
805
+ * - Mincha Gedola
806
+ * - Mincha Ketana
807
+ * - Plag HaMincha
808
+ * - Sunset at sea level
809
+ * - Sunset at current elevation
810
+ * - Nightfall (45 minutes after sunset)
811
+ * - Nightfall (50 minutes after sunset)
812
+ * - Rabbeinu Tam (72 minutes after sunset)
813
+ * - Rabbeinu Tam - Zmanios
814
+ * - Rabbeinu Tam - Zmanios MG"A
815
+ * - Candle lighting time
816
+ * - Stop eating Chometz
817
+ * - Destroy Chometz
769
818
  */
770
819
  declare const ZmanTypes: ZmanToShow[];
771
820
  /**
@@ -884,7 +933,7 @@ declare class ZmanimUtils {
884
933
  * @param {jDate} jdate
885
934
  * @param {Location} location
886
935
  */
887
- static getWhichDays(date: Date, jdate: jDate, location: Location): 0 | 1 | 2 | 4 | 8 | 32 | 16 | 64 | 128;
936
+ static getWhichDays(date: Date, jdate: jDate, location: Location): 0 | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128;
888
937
  /**
889
938
  * Returns the zmanim necessary for showing basic shul notifications: chatzosHayom, chatzosHalayla, alos
890
939
  * @param {jDate|Date} date
@@ -905,7 +954,7 @@ declare class ZmanimUtils {
905
954
  */
906
955
  static getAllZmanim(date: jDate | Date, location: Location): {
907
956
  zmanType: ZmanToShow;
908
- time?: Time | undefined;
957
+ time?: Time;
909
958
  }[];
910
959
  }
911
960