Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Following instructions are the product of a forum discussion taken in Drupal Israel site: http://www.drupal.org.il/node/3749 and are based on Mooffie's code with help from Yuval Hagger.
1. In Computed code paste the code that you find here:
http://drupa.co.il/_files/forexternsites/drupal.org-node-622098.txt
2. In Display format paste this:
<?php
$display = $node_field_item['value'];
?>
3. If you choose to store it in the database, varchar with 25 characters will be fine.
Note: For English names and calculation of the Jewish data look inside the code for "ELUL".
Comments
the file you link is not
the file you link is not UTF-8 encoded.
Also, this form of code posting is not very usable. if you can make a module out of it you'll get usage stats, bug reports and version control.
Drupal7 computed field gregorian to hebrew date conversion
I couldn't find the code referenced above, and had to figure this out again, so here it is in case anyone else finds themself in a similar situation.
This code converts a cck field called gregorian_date to a string displaying the complete hebrew date:
Computed Code (PHP)
DISPLAY CODE (php) // this is the default
API for Hebrew Dates (Jewish Dates)
I found open source API for calculating Jewish Dates:
https://www.hebcal.com/home/developer-apis
Also,
http://www.programmableweb.com/api/hebcal-jewish-calendar