@hebcal/core 3.32.1 → 3.33.3

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/hebcal.d.ts CHANGED
@@ -56,6 +56,7 @@ declare module '@hebcal/core' {
56
56
  MINOR_HOLIDAY,
57
57
  EREV,
58
58
  CHOL_HAMOED,
59
+ MISHNA_YOMI,
59
60
  }
60
61
 
61
62
  export type UnitTypeShort = 'd' | 'w' | 'M' | 'y';
@@ -545,6 +546,8 @@ declare module '@hebcal/core' {
545
546
  noHolidays?: boolean;
546
547
  /** include Daf Yomi */
547
548
  dafyomi?: boolean;
549
+ /** include Mishna Yomi */
550
+ mishnaYomi?: boolean;
548
551
  /** include Days of the Omer */
549
552
  omer?: boolean;
550
553
  /** include event announcing the molad */
@@ -765,18 +768,57 @@ declare module '@hebcal/core' {
765
768
  * Hebrew months of the year (NISAN=1, TISHREI=7)
766
769
  */
767
770
  export const enum months {
771
+ /**
772
+ * Nissan / ניסן
773
+ */
768
774
  NISAN = 1,
775
+ /**
776
+ * Iyyar / אייר
777
+ */
769
778
  IYYAR = 2,
779
+ /**
780
+ * Sivan / סיון
781
+ */
770
782
  SIVAN = 3,
783
+ /**
784
+ * Tamuz (sometimes Tammuz) / תמוז
785
+ */
771
786
  TAMUZ = 4,
787
+ /**
788
+ * Av / אב
789
+ */
772
790
  AV = 5,
791
+ /**
792
+ * Elul / אלול
793
+ */
773
794
  ELUL = 6,
795
+ /**
796
+ * Tishrei / תִשְׁרֵי
797
+ */
774
798
  TISHREI = 7,
799
+ /**
800
+ * Cheshvan / חשון
801
+ */
775
802
  CHESHVAN = 8,
803
+ /**
804
+ * Kislev / כסלו
805
+ */
776
806
  KISLEV = 9,
807
+ /**
808
+ * Tevet / טבת
809
+ */
777
810
  TEVET = 10,
811
+ /**
812
+ * Sh'vat / שבט
813
+ */
778
814
  SHVAT = 11,
815
+ /**
816
+ * Adar or Adar Rishon / אדר
817
+ */
779
818
  ADAR_I = 12,
819
+ /**
820
+ * Adar Sheini (only on leap years) / אדר ב׳
821
+ */
780
822
  ADAR_II = 13
781
823
  }
782
824
 
@@ -840,6 +882,10 @@ declare module '@hebcal/core' {
840
882
  getFirstSaturday(): number;
841
883
  }
842
884
 
885
+ /**
886
+ * An event that has an `eventTime` and `eventTimeStr`
887
+ * @param desc - Description (not translated)
888
+ */
843
889
  export class TimedEvent extends Event {
844
890
  constructor(date: HDate, desc: string, mask: number, eventTime: Date, location: Location, linkedEvent?: Event);
845
891
  render(locale?: string): string;
@@ -922,4 +968,39 @@ declare module '@hebcal/core' {
922
968
  * gematriya(5774) // תשע״ד - cropped to 774
923
969
  */
924
970
  export function gematriya(number: number): string;
971
+
972
+ /**
973
+ * Describes a mishna to be read
974
+ * @property k - tractate name in Sephardic transliteration (e.g. "Berakhot", "Moed Katan")
975
+ * @property v - verse (e.g. "2:1")
976
+ */
977
+ export type MishnaYomi = {
978
+ k: string;
979
+ v: string;
980
+ };
981
+ /**
982
+ * Initializes a Mishna Yomi instance
983
+ */
984
+ export class MishnaYomiIndex {
985
+ /**
986
+ * Looks up a Mishna Yomi
987
+ * @param date - Gregorian date
988
+ */
989
+ lookup(date: Date | HDate | number): MishnaYomi[];
990
+ }
991
+ /**
992
+ * Event wrapper around a Mishna Yomi instance
993
+ */
994
+ export class MishnaYomiEvent {
995
+ constructor(date: HDate, mishnaYomi: MishnaYomi[]);
996
+ /**
997
+ * Returns Mishna Yomi name (e.g. "Bava Metzia 10:5-6" or "Berakhot 9:5-Peah 1:1").
998
+ * @param [locale] - Optional locale name (defaults to active locale).
999
+ */
1000
+ render(locale?: string): string;
1001
+ /**
1002
+ * Returns a link to sefaria.org
1003
+ */
1004
+ url(): string;
1005
+ }
925
1006
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hebcal/core",
3
- "version": "3.32.1",
3
+ "version": "3.33.3",
4
4
  "author": "Michael J. Radwin (https://github.com/mjradwin)",
5
5
  "contributors": [
6
6
  "Eyal Schachter (https://github.com/Scimonster)",
@@ -58,34 +58,26 @@
58
58
  "require": [
59
59
  "@babel/register"
60
60
  ],
61
- "babel": {
62
- "testOptions": {
63
- "presets": [
64
- "@babel/preset-env"
65
- ]
66
- }
67
- },
68
61
  "inherit": true,
69
62
  "verbose": true
70
63
  },
71
64
  "devDependencies": {
72
- "@ava/babel": "^2.0.0",
73
- "@babel/core": "^7.16.7",
74
- "@babel/preset-env": "^7.16.7",
75
- "@babel/register": "^7.16.7",
65
+ "@babel/core": "^7.17.5",
66
+ "@babel/preset-env": "^7.16.11",
67
+ "@babel/register": "^7.17.0",
76
68
  "@hebcal/solar-calc": "^1.1.0",
77
69
  "@rollup/plugin-babel": "^5.3.0",
78
70
  "@rollup/plugin-commonjs": "^21.0.1",
79
71
  "@rollup/plugin-json": "^4.1.0",
80
72
  "@rollup/plugin-node-resolve": "^13.1.3",
81
- "ava": "^3.15.0",
82
- "core-js": "^3.20.2",
83
- "eslint": "^8.6.0",
73
+ "ava": "^4.0.1",
74
+ "core-js": "^3.21.1",
75
+ "eslint": "^8.9.0",
84
76
  "eslint-config-google": "^0.14.0",
85
- "jsdoc": "^3.6.7",
86
- "jsdoc-to-markdown": "^7.1.0",
77
+ "jsdoc": "^3.6.10",
78
+ "jsdoc-to-markdown": "^7.1.1",
87
79
  "nyc": "^15.1.0",
88
- "rollup": "^2.63.0",
80
+ "rollup": "^2.67.3",
89
81
  "rollup-plugin-terser": "^7.0.2",
90
82
  "tsd-jsdoc": "^2.5.0",
91
83
  "ttag-cli": "^1.9.3"