hebcal / dotcom

deprecated hebcal.com source code
https://github.com/hebcal/hebcal-web
21 stars 9 forks source link

how To Find Next Yahrzeit Date #41

Open j-j-gajjar opened 3 years ago

j-j-gajjar commented 3 years ago

can you provide me API which one is used to find the next Date of Yahrzeit.

APRIL 5, 2020 is Yahrzeit date .

and I want 24 Mar 2021

mjradwin commented 3 years ago

We recently released some experimental support for a REST yahrzeit API.

It's an enhancement to our existing Yahrzeit + Anniversary Calendar page at https://www.hebcal.com/yahrzeit

It's not documented formally yet. The basic idea is that you'll need to POST x-www-form-urlencoded data to https://www.hebcal.com/yahrzeit with the special parameter cfg=json

For example:

curl \
  --compressed \
  -H 'content-type: application/x-www-form-urlencoded' \
  --data-raw 'cfg=json&v=yahrzeit&n1=Example1&t1=Birthday&d1=15&m1=4&y1=1983&s1=on&n2=Example2&t2=Yahrzeit&d2=13&m2=11&y2=2008&s2=off&hebdate=on&years=4' \
  'https://www.hebcal.com/yahrzeit' 

If you post this case you'll get back text/json response instead of text/html

{
  "title": "Hebrew Anniversaries: Example1, Example2",
  "date": "2021-03-22T16:15:50.502Z",
  "items": [
    {
      "title": "Example2's 12th Yahrzeit (15th of Cheshvan)",
      "date": "2020-11-02",
      "memo": "Hebcal joins you in remembering Example2, whose 12th Yahrzeit occurs on Monday, November 2, corresponding to the 15th of Cheshvan, 5781.\n\nExample2's Yahrzeit begins at sundown on Sunday, November 1 and continues until sundown on the day of observance. It is customary to light a memorial candle at sundown as the Yahrzeit begins.\n\nMay your loved one's soul be bound up in the bond of eternal life and may their memory serve as a continued source of inspiration and comfort to you."
    },
    {
      "title": "Example1's 38th Hebrew Birthday (3rd of Iyyar)",
      "date": "2021-04-15",
      "memo": "Hebcal joins you in honoring Example1, whose 38th Hebrew Birthday occurs on Thursday, April 15, corresponding to the 3rd of Iyyar, 5781.\n\nExample1's Hebrew Birthday begins at sundown on Wednesday, April 14 and continues until sundown on the day of observance."
    },
    {
      "title": "Example2's 13th Yahrzeit (15th of Cheshvan)",
      "date": "2021-10-21",
      "memo": "Hebcal joins you in remembering Example2, whose 13th Yahrzeit occurs on Thursday, October 21, corresponding to the 15th of Cheshvan, 5782.\n\nExample2's Yahrzeit begins at sundown on Wednesday, October 20 and continues until sundown on the day of observance. It is customary to light a memorial candle at sundown as the Yahrzeit begins.\n\nMay your loved one's soul be bound up in the bond of eternal life and may their memory serve as a continued source of inspiration and comfort to you."
    },
    {
      "title": "Example1's 39th Hebrew Birthday (3rd of Iyyar)",
      "date": "2022-05-04",
      "memo": "Hebcal joins you in honoring Example1, whose 39th Hebrew Birthday occurs on Wednesday, May 4, corresponding to the 3rd of Iyyar, 5782.\n\nExample1's Hebrew Birthday begins at sundown on Tuesday, May 3 and continues until sundown on the day of observance."
    },
    {
      "title": "Example2's 14th Yahrzeit (15th of Cheshvan)",
      "date": "2022-11-09",
      "memo": "Hebcal joins you in remembering Example2, whose 14th Yahrzeit occurs on Wednesday, November 9, corresponding to the 15th of Cheshvan, 5783.\n\nExample2's Yahrzeit begins at sundown on Tuesday, November 8 and continues until sundown on the day of observance. It is customary to light a memorial candle at sundown as the Yahrzeit begins.\n\nMay your loved one's soul be bound up in the bond of eternal life and may their memory serve as a continued source of inspiration and comfort to you."
    },
    {
      "title": "Example1's 40th Hebrew Birthday (3rd of Iyyar)",
      "date": "2023-04-24",
      "memo": "Hebcal joins you in honoring Example1, whose 40th Hebrew Birthday occurs on Monday, April 24, corresponding to the 3rd of Iyyar, 5783.\n\nExample1's Hebrew Birthday begins at sundown on Sunday, April 23 and continues until sundown on the day of observance."
    },
    {
      "title": "Example2's 15th Yahrzeit (15th of Cheshvan)",
      "date": "2023-10-30",
      "memo": "Hebcal joins you in remembering Example2, whose 15th Yahrzeit occurs on Monday, October 30, corresponding to the 15th of Cheshvan, 5784.\n\nExample2's Yahrzeit begins at sundown on Sunday, October 29 and continues until sundown on the day of observance. It is customary to light a memorial candle at sundown as the Yahrzeit begins.\n\nMay your loved one's soul be bound up in the bond of eternal life and may their memory serve as a continued source of inspiration and comfort to you."
    },
    {
      "title": "Example1's 41st Hebrew Birthday (3rd of Iyyar)",
      "date": "2024-05-11",
      "memo": "Hebcal joins you in honoring Example1, whose 41st Hebrew Birthday occurs on Saturday, May 11, corresponding to the 3rd of Iyyar, 5784.\n\nExample1's Hebrew Birthday begins at sundown on Friday, May 10 and continues until sundown on the day of observance."
    },
    {
      "title": "Example2's 16th Yahrzeit (15th of Cheshvan)",
      "date": "2024-11-16",
      "memo": "Hebcal joins you in remembering Example2, whose 16th Yahrzeit occurs on Saturday, November 16, corresponding to the 15th of Cheshvan, 5785.\n\nExample2's Yahrzeit begins at sundown on Friday, November 15 and continues until sundown on the day of observance. It is customary to light a memorial candle before sundown as the Yahrzeit begins.\n\nMay your loved one's soul be bound up in the bond of eternal life and may their memory serve as a continued source of inspiration and comfort to you."
    },
    {
      "title": "Example1's 42nd Hebrew Birthday (3rd of Iyyar)",
      "date": "2025-05-01",
      "memo": "Hebcal joins you in honoring Example1, whose 42nd Hebrew Birthday occurs on Thursday, May 1, corresponding to the 3rd of Iyyar, 5785.\n\nExample1's Hebrew Birthday begins at sundown on Wednesday, April 30 and continues until sundown on the day of observance."
    }
  ]
}
mjradwin commented 3 years ago

Some additional API documentation is now posted here

https://www.hebcal.com/home/1705/yahrzeit-anniversary-api

j-j-gajjar commented 3 years ago

It is good, but can you add a new input to it, with the help of which we can do data retrieval only next year or particular year!

mjradwin commented 2 years ago

You can currently use the years parameter to configure how many years into the future (starting with the current Hebrew year) you wish to look up. Set years=1 for only the current Hebrew year.

We'll look into adding support for specifying an arbitrary year (including years in the past).