Skip to content

bigfunctions > gregorian2hijri

gregorian2hijri

Call or Deploy gregorian2hijri ?

✅ You can call this gregorian2hijri bigfunction directly from your Google Cloud Project (no install required).

  • This gregorian2hijri function is deployed in bigfunctions GCP project in 39 datasets for all of the 39 BigQuery regions. You need to use the dataset in the same region as your datasets (otherwise you may have a function not found error).
  • Function is public, so it can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
  • You may prefer to deploy the BigFunction in your own project if you want to build and manage your own catalog of functions. This is particularly useful if you want to create private functions (for example calling your internal APIs). Discover the framework

Public BigFunctions Datasets:

Region Dataset
eu bigfunctions.eu
us bigfunctions.us
europe-west1 bigfunctions.europe_west1
asia-east1 bigfunctions.asia_east1
... ...

Description

Signature

gregorian2hijri(gregorian_date)

Description

Convert Gregorian Date to Hijri Date (taken from here)

Examples

select bigfunctions.eu.gregorian2hijri(date '2023-02-12')
select bigfunctions.us.gregorian2hijri(date '2023-02-12')
select bigfunctions.europe_west1.gregorian2hijri(date '2023-02-12')
+------------+
| hijri_date |
+------------+
| 1444-7-20  |
+------------+

Need help using gregorian2hijri?

The community can help! Engage the conversation on Slack

For professional suppport, don't hesitate to chat with us.

Found a bug using gregorian2hijri?

If the function does not work as expected, please

  • report a bug so that it can be improved.
  • or open the discussion with the community on Slack.

For professional suppport, don't hesitate to chat with us.

Use cases

A use case for the gregorian2hijri function would be for any application or analysis that needs to represent dates in both the Gregorian and Hijri calendars. Here are a few specific examples:

  • Event Scheduling and Reminders: An application scheduling events for a predominantly Muslim audience could use this function to display event dates in the Hijri calendar alongside the Gregorian date. This would be particularly relevant for religious holidays or culturally significant dates. Reminder systems could also utilize this function to send out reminders based on the Hijri date.

  • Historical Data Analysis: Researchers studying historical events in regions where the Hijri calendar was prevalent could use this function to convert Gregorian dates in their datasets to Hijri dates. This allows for a more accurate understanding of the timing of events within the historical context.

  • Financial Reporting: Businesses operating in regions using the Hijri calendar might need to generate reports based on both calendar systems. This function would facilitate the conversion of Gregorian transaction dates to Hijri dates for accurate financial reporting and analysis.

  • Data Warehousing and ETL: In a data warehouse setting, having a function like this available simplifies the process of converting Gregorian dates to Hijri dates during the Extract, Transform, Load (ETL) process. This allows for consistent date representation and facilitates analysis that requires both calendar systems.

  • E-commerce and Localized Applications: E-commerce platforms or applications catering to a global audience could use this function to display dates in the user's preferred calendar system. This improves user experience and facilitates better understanding of delivery dates, promotional periods, etc., especially in regions where the Hijri calendar is commonly used.

  • Genealogical Research: Individuals researching family history in regions using the Hijri calendar could use this function to convert Gregorian dates on birth certificates, marriage records, or other historical documents to Hijri dates, aiding in the accurate reconstruction of family timelines.

In essence, gregorian2hijri bridges the gap between the Gregorian and Hijri calendar systems within BigQuery, enabling a wider range of applications and analyses for data involving dates relevant to both calendars.

Spread the word

BigFunctions is fully open-source. Help make it a success by spreading the word!

Share on Add a on