Giter Club home page Giter Club logo

milesian_converter_php's People

Contributors

louis-aime avatar

Watchers

 avatar

milesian_converter_php's Issues

getting error

I tried to open the code in browser and got below error. Can we hae this in english?

  1. ? $juliandate ["relativeyear"] : $juliandate ["relativeyear"] - 1; // PHP uses non-zero years fir Julian and Gregorian calendars$juliandate ["month"] = (int) $_POST ["jmonth"];$juliandate ["day"] = (int) $_POST ["jquant"];$gregdate ["relativeyear"] = (int) $_POST ["gyear"];$gregdate ["year"] = ($gregdate ["relativeyear"] >0) ? $gregdate ["relativeyear"] : $gregdate ["relativeyear"] - 1; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate ["month"] = (int) $_POST ["gmonth"];$gregdate ["day"] = (int) $_POST ["gquant"];$jewdate ["year"] = (int) $_POST ["hyear"]; // No special handling of the negative Jewish years, the world did not exist at that time...$jewdate ["month"] = (int) $_POST ["hmonth"];$jewdate ["day"] = (int) $_POST ["hquant"]; // switch ($_POST ["Compute"]) {case "Today" :$today = getdate(); // la date courante -- attention le tableau reçu de getdate n'a pas la même structure que $md.$message = "Dates et jour julien aujourd'hui";$jd = gregoriantojd ($today["mon"], $today["mday"], $today["year"]); // Julian day of today$md = cal_from_jd_milesian ($jd); // Milesian date of today$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH);$wd = french_weekday_name($md["dow"]);break;case "Shift" : try {$jd1 = $jd + $days;$tempd1 = cal_from_jd_milesian ($jd1); // Exception may occur here. If catched, next instructions will not be performed.$jd = $jd1;$md = $tempd1;$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years for Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years for Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH);$wd = french_weekday_name($md["dow"]);}catch (Exception $e) {$message = "Jour julien irrégulier ou hors limites";}break;case "JulianDay" : try {$tempd1 = cal_from_jd_milesian ($jd); // Exception may occur here. If catched, next instructions will not be performed.$md = $tempd1;$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH); $wd = french_weekday_name($md["dow"]);}catch (Exception $e) {$message = "Jour julien irrégulier ou hors limites";}break;case "Milesian" : try {$jd1 = milesiantojd ($md ["month"],$md ["day"],$md ["year"]); // Exception may occur here. If catched, next instructions will not be performed.$jd = $jd1;$md = cal_from_jd_milesian ($jd); // In order to replenish the "monthname" field.$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH);$wd = french_weekday_name(jddayofweek($jd));}catch (Exception $e) {$message = "Date irrégulière ou hors limites";}break;case "Julian" : try {$jd1 = juliantojd ($juliandate ["month"],$juliandate ["day"],$juliandate ["year"]); // Exception may occur here. If catched, next instructions will not be performed.$jd = $jd1;$md = cal_from_jd_milesian ($jd);$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH);$wd = french_weekday_name(jddayofweek($jd));}catch (Exception $e) {$message = "Date irrégulière ou hors limites";}break;case "Gregorian" : try {$jd1 = gregoriantojd ($gregdate ["month"],$gregdate ["day"],$gregdate ["year"]); // Exception may occur here. If catched, next instructions will not be performed.// if ($jd1 <= 0) throw new DomainException("Invalid date (Gregorian)");$jd = $jd1;$md = cal_from_jd_milesian ($jd);$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH);$wd = french_weekday_name(jddayofweek($jd));}catch (Exception $e) {$message = "Date irrégulière ou hors limites";}break;case "Hebraic" : try {$jd1 = jewishtojd ($jewdate ["month"],$jewdate ["day"],$jewdate ["year"]); // Exception may occur here. If catched, next instructions will not be performed.$jd = $jd1;$md = cal_from_jd_milesian ($jd);$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH);$wd = french_weekday_name(jddayofweek($jd));}catch (Exception $e) {$message = "Date irrégulière ou hors limites";}break; } } else { // No data posted: prepare data of today, to be inserted in first form$today = getdate(); // la date courante -- attention le tableau reçu de getdate n'a pas la même structure que $md.$message = "Dates et jour julien aujourd'hui";$days = 1;$jd = gregoriantojd ($today["mon"], $today["mday"], $today["year"]); // Julian day of today$md = cal_from_jd_milesian ($jd); // Milesian date of today$wd = french_weekday_name($md["dow"]);$juliandate = cal_from_jd ($jd, CAL_JULIAN);$juliandate ["relativeyear"] = ($juliandate ["year"] < 0) ? $juliandate ["year"] + 1 : $juliandate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$gregdate = cal_from_jd ($jd, CAL_GREGORIAN);$gregdate ["relativeyear"] = ($gregdate ["year"] < 0) ? $gregdate ["year"] + 1 : $gregdate ["year"]; // PHP uses non-zero years fir Julian and Gregorian calendars$jewdate = cal_from_jd ($jd, CAL_JEWISH); } ?>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.