/includes/functions_date.php

Description

Date Functions that can be used by any page in PGV

The functions in this file are common to all PGV pages and include date conversion routines and sorting functions.

phpGedView: Genealogy Viewer Copyright (C) 2002 to 2006 John Finlay and Others

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • version: $Id: functions_date.php 981 2007-03-21 13:24:38Z fisharebest $
Includes
require_once ("includes/functions_date_hebrew.php") (line 42)
require_once ("includes/functions_date_hijri.php") (line 35)

Date Functions that can be used by any page in PGV

The functions in this file are common to all PGV pages and include date conversion routines and sorting functions.

phpGedView: Genealogy Viewer Copyright (C) 2002 to 2006 John Finlay and Others

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  • version: $Id: functions_date.php 981 2007-03-21 13:24:38Z fisharebest $
Functions
convert_date (line 56)

convert a date to other languages or formats

converts and translates a date based on the selected language and calendar format

  • return: the new converted date
string convert_date (string $dstr_beg, string $dstr_end, int $day, string $month, int $year)
  • string $dstr_beg: prepend this string to the converted date
  • string $dstr_end: append the string to the converted date
  • int $day: the day of month for the date
  • string $month: the abbreviated month (ie JAN, FEB, MAR, etc)
  • int $year: the year (ie 1900, 2004, etc)
get_age (line 728)

get an individuals age at the given date

get an individuals age at the given date

  • return: the age in a string
string get_age (string $indirec, string $datestr, [string $style = 1])
  • string $indirec: the individual record so that we can get the birth date
  • string $datestr: the date string (everything after DATE) to calculate the age for
  • string $style: optional style (default 1=HTML style)
get_age_at_event (line 861)

translate gedcom age string

Examples: 4y 8m 10d. Chi INFANT

  • return: age in user language
  • see: AGE_AT_EVENT
string get_age_at_event (string $agestring)
  • string $agestring: gedcom AGE field value
get_changed_date (line 305)

parse a gedcom date

this function will parse a gedcom date and convert it to the form defined by the language file by calling the convert_date function

  • return: the new date string
string get_changed_date (string $datestr, [ $linebr = false])
  • string $datestr: the date string (ie everything after the DATE tag)
  • $linebr
get_date_url (line 536)

create an anchor url to the calendar for a date

create an anchor url to the calendar for a date and parses the date using the get changed date function

  • return: a converted date with anchor html tags around it <a href="">date</a>
  • author: Roland (botak)
string get_date_url (string $datestr)
  • string $datestr: the date string (ie everything after the DATE tag)
parse_date (line 904)

parse a gedcom date into an array

parses a gedcom date IE 1 JAN 2002 into an array of month day and year values

  • return: returns an array with indexes "day"=1 "month"=JAN "mon"=1 "year"=2002 "ext" = abt
array parse_date (string $datestr)
  • string $datestr: The date to parse
parse_time (line 1010)

Parse a time string into its different parts

  • return: returns an array with the hour, minutes, and seconds
array parse_time (string $timestr)
  • string $timestr: the time as it was taken from the TIME tag

Documentation generated on Wed, 28 Mar 2007 09:54:17 -0600 by phpDocumentor 1.3.1