php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
calendar.c File Reference
#include "php.h"
#include "ext/standard/info.h"
#include "php_calendar.h"
#include "sdncal.h"
#include <stdio.h>
#include "calendar_arginfo.h"

Go to the source code of this file.

Data Structures

struct  cal_entry_t
 

Macros

#define JEWISH_MONTH_NAME(year)
 
#define JEWISH_HEB_MONTH_NAME(year)
 
#define CAL_JEWISH_ADD_ALAFIM_GERESH   0x2
 
#define CAL_JEWISH_ADD_ALAFIM   0x4
 
#define CAL_JEWISH_ADD_GERESHAYIM   0x8
 

Typedefs

typedef zend_long(* cal_to_jd_func_t) (int month, int day, int year)
 
typedef void(* cal_from_jd_func_t) (zend_long jd, int *year, int *month, int *day)
 
typedef char *(* cal_as_string_func_t) (int year, int month, int day)
 

Enumerations

enum  cal_name_type_t {
  CAL_GREGORIAN = 0 , CAL_JULIAN , CAL_JEWISH , CAL_FRENCH ,
  CAL_NUM_CALS
}
 
enum  { CAL_DOW_DAYNO , CAL_DOW_LONG , CAL_DOW_SHORT }
 
enum  {
  CAL_MONTH_GREGORIAN_SHORT , CAL_MONTH_GREGORIAN_LONG , CAL_MONTH_JULIAN_SHORT , CAL_MONTH_JULIAN_LONG ,
  CAL_MONTH_JEWISH , CAL_MONTH_FRENCH
}
 

Functions

 PHP_MINIT_FUNCTION (calendar)
 
 PHP_MINFO_FUNCTION (calendar)
 
 PHP_FUNCTION (cal_info)
 
 PHP_FUNCTION (cal_days_in_month)
 
 PHP_FUNCTION (cal_to_jd)
 
 PHP_FUNCTION (cal_from_jd)
 
 PHP_FUNCTION (jdtogregorian)
 
 PHP_FUNCTION (gregoriantojd)
 
 PHP_FUNCTION (jdtojulian)
 
 PHP_FUNCTION (juliantojd)
 
 PHP_FUNCTION (jdtojewish)
 
 PHP_FUNCTION (jewishtojd)
 
 PHP_FUNCTION (jdtofrench)
 
 PHP_FUNCTION (frenchtojd)
 
 PHP_FUNCTION (jddayofweek)
 
 PHP_FUNCTION (jdmonthname)
 

Variables

zend_module_entry calendar_module_entry
 

Macro Definition Documentation

◆ CAL_JEWISH_ADD_ALAFIM

#define CAL_JEWISH_ADD_ALAFIM   0x4

Definition at line 89 of file calendar.c.

◆ CAL_JEWISH_ADD_ALAFIM_GERESH

#define CAL_JEWISH_ADD_ALAFIM_GERESH   0x2

Definition at line 88 of file calendar.c.

◆ CAL_JEWISH_ADD_GERESHAYIM

#define CAL_JEWISH_ADD_GERESHAYIM   0x8

Definition at line 90 of file calendar.c.

◆ JEWISH_HEB_MONTH_NAME

#define JEWISH_HEB_MONTH_NAME ( year)
Value:
const int monthsPerYear[19]
Definition jewish.c:286
const char *const JewishMonthHebName[14]
Definition jewish.c:355
const char *const JewishMonthHebNameLeap[14]
Definition jewish.c:336

Definition at line 73 of file calendar.c.

◆ JEWISH_MONTH_NAME

#define JEWISH_MONTH_NAME ( year)
Value:
const char *const JewishMonthNameLeap[14]
Definition jewish.c:298
const char *const JewishMonthName[14]
Definition jewish.c:317

Definition at line 72 of file calendar.c.

Typedef Documentation

◆ cal_as_string_func_t

typedef char *(* cal_as_string_func_t) (int year, int month, int day)

Definition at line 48 of file calendar.c.

◆ cal_from_jd_func_t

typedef void(* cal_from_jd_func_t) (zend_long jd, int *year, int *month, int *day)

Definition at line 47 of file calendar.c.

◆ cal_to_jd_func_t

typedef zend_long(* cal_to_jd_func_t) (int month, int day, int year)

Definition at line 46 of file calendar.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
CAL_MONTH_GREGORIAN_SHORT 
CAL_MONTH_GREGORIAN_LONG 
CAL_MONTH_JULIAN_SHORT 
CAL_MONTH_JULIAN_LONG 
CAL_MONTH_JEWISH 
CAL_MONTH_FRENCH 

Definition at line 79 of file calendar.c.

◆ anonymous enum

anonymous enum
Enumerator
CAL_DOW_DAYNO 
CAL_DOW_LONG 
CAL_DOW_SHORT 

Definition at line 76 of file calendar.c.

◆ cal_name_type_t

Enumerator
CAL_GREGORIAN 
CAL_JULIAN 
CAL_JEWISH 
CAL_FRENCH 
CAL_NUM_CALS 

Definition at line 38 of file calendar.c.

Function Documentation

◆ PHP_FUNCTION() [1/14]

PHP_FUNCTION ( cal_days_in_month )

Definition at line 182 of file calendar.c.

◆ PHP_FUNCTION() [2/14]

PHP_FUNCTION ( cal_from_jd )

Definition at line 247 of file calendar.c.

◆ PHP_FUNCTION() [3/14]

PHP_FUNCTION ( cal_info )

Definition at line 151 of file calendar.c.

◆ PHP_FUNCTION() [4/14]

PHP_FUNCTION ( cal_to_jd )

Definition at line 229 of file calendar.c.

◆ PHP_FUNCTION() [5/14]

PHP_FUNCTION ( frenchtojd )

Definition at line 514 of file calendar.c.

◆ PHP_FUNCTION() [6/14]

PHP_FUNCTION ( gregoriantojd )

Definition at line 314 of file calendar.c.

◆ PHP_FUNCTION() [7/14]

PHP_FUNCTION ( jddayofweek )

Definition at line 527 of file calendar.c.

◆ PHP_FUNCTION() [8/14]

PHP_FUNCTION ( jdmonthname )

Definition at line 557 of file calendar.c.

◆ PHP_FUNCTION() [9/14]

PHP_FUNCTION ( jdtofrench )

Definition at line 498 of file calendar.c.

◆ PHP_FUNCTION() [10/14]

PHP_FUNCTION ( jdtogregorian )

Definition at line 298 of file calendar.c.

◆ PHP_FUNCTION() [11/14]

PHP_FUNCTION ( jdtojewish )

Definition at line 452 of file calendar.c.

◆ PHP_FUNCTION() [12/14]

PHP_FUNCTION ( jdtojulian )

Definition at line 327 of file calendar.c.

◆ PHP_FUNCTION() [13/14]

PHP_FUNCTION ( jewishtojd )

Definition at line 485 of file calendar.c.

◆ PHP_FUNCTION() [14/14]

PHP_FUNCTION ( juliantojd )

Definition at line 343 of file calendar.c.

◆ PHP_MINFO_FUNCTION()

PHP_MINFO_FUNCTION ( calendar )

Definition at line 118 of file calendar.c.

◆ PHP_MINIT_FUNCTION()

PHP_MINIT_FUNCTION ( calendar )

Definition at line 111 of file calendar.c.

Variable Documentation

◆ calendar_module_entry

zend_module_entry calendar_module_entry
Initial value:
= {
"calendar",
ext_functions,
PHP_MINIT(calendar),
PHP_MINFO(calendar),
}
#define NULL
Definition gdcache.h:45
#define PHP_MINFO
Definition php.h:396
#define PHP_MINIT
Definition php.h:392
#define PHP_CALENDAR_VERSION
Definition php_calendar.h:8
#define STANDARD_MODULE_HEADER
#define STANDARD_MODULE_PROPERTIES

Definition at line 94 of file calendar.c.