gregorian2hijri¶
gregorian2hijri(gregorian_date)
Description¶
Convert Gregorian Date to Hijri Date (taken from here)
Examples¶
Call or Deploy gregorian2hijri
?
Call gregorian2hijri
directly
The easiest way to use bigfunctions
gregorian2hijri
function is deployed in 39 public datasets for all of the 39 BigQuery regions.- It can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
- (You need to use the dataset in the same region as your datasets otherwise you may have a function not found error)
Public BigFunctions Datasets
Region | Dataset |
---|---|
eu |
bigfunctions.eu |
us |
bigfunctions.us |
europe-west1 |
bigfunctions.europe_west1 |
asia-east1 |
bigfunctions.asia_east1 |
... | ... |
Deploy gregorian2hijri
in your project
Why deploy?
- You may prefer to deploy
gregorian2hijri
in your own project 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).
- Get started by reading the framework page
Deployment
gregorian2hijri
function can be deployed with:
pip install bigfunctions
bigfun get gregorian2hijri
bigfun deploy gregorian2hijri
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 or Found a bug using gregorian2hijri
?
Get help using gregorian2hijri
The community can help! Engage the conversation on Slack
We also provide professional suppport.
Report a bug about 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.
We also provide professional suppport.
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!