Time and Date

Total Page:16

File Type:pdf, Size:1020Kb

Time and Date 05_0672328887_CH03.qxd 6/8/06 2:38 PM Page 57 3 Time and Date APPLICATIONS THAT DEAL WITH TIME ARE forever present, especially in web-based applications: times of form submittals, user input such as date of birth, and the updating and removal of pages when out of date are just a few examples.Though potentially com- plicated, the date extensions in PHP are relatively simple and straightforward. This chapter deals mainly with the core date and time functions.These functions pro- vide all the basics for time manipulation: retrieving, formatting, and converting. One other extension, the Calendar functions, is devoted to conversion between different cal- endar systems, such as converting dates between the Gregorian and Jewish calendars. See the functions cal_to_jd() and cal_from_jd() in the “Quick Hits” section. A subject beyond the scope of this chapter is that of schedule or calendar manage- ment, such as meeting and event scheduling.An extension is available, called MCAL, which does provide such functionality. For more information, see http://php.net/mcal. To fully utilize the time functionality of PHP,you must understand how PHP meas- ures time. For PHP,time is measured as the number of seconds since January 1, 1970, the UNIX epoch. Hence any moment in time is stored as a simple integer.Time, when stored this way, is often referred to as a time stamp.As you will see, many functions either return a time stamp or use a time stamp as a parameter.You must be careful however, when reading documentation or code comments. Depending on context, the term time stamp can also be used in its more generic sense: a time at which something occurs. For exam- ple, when referring to web server log files, the time at which an event is logged is referred to as a time stamp. Quick Hits . Get the time stamp for the current time: $timestamp = time(); Taking no parameters, this function returns the time stamp of the current time—that is, when time() is called. Full documentation: http://php.net/time 05_0672328887_CH03.qxd 6/8/06 2:38 PM Page 58 58 Chapter 3 Time and Date . Get the current time stamp to the microsecond resolution: $result = microtime($format); Returns the UNIX time stamp but resolved to microseconds in accuracy. If $format is false, the default, the time is returned as the string “seconds microseconds” with the seconds portion the same as that returned by time(), and microseconds as a fraction of a second. If $format is true, the time is returned as a floating point number. Full documentation: http://php.net/microtime . Create a time stamp for a specified date and time: $timestamp = mktime($hour, $minute, $second, $month, $day, $year); Returns a time stamp that corresponds to the specified time and date. Full documentation: http://php.net/mktime . Format the specified time: $string = date($format, $timestamp); Returns a string representing the given time stamp based on the specified format. If $time- stamp is not specified, the current time is used. Full documentation: http://php.net/date . Format a date and time, adjusting the result to be Greenwich Mean Time (GMT): $string = gmdate($format, $timestamp); This function is equivalent to date(). However, the time is adjusted to be relative to GMT repre- sentation of the given time. Full documentation: http://php.net/gmdate . Get various information about a specified time: $time_array = getdate($timestamp); Returns an array of various values based on the given time stamp. The keys to the array are sec- onds, minutes, hours, mday, wday, mon, year, yday, weekday, month. Full documentation: http://php.net/getdate . Get and set the time zone used by the time functions: $string = date_default_timezone_get(); date_default_timezone_set($string); This pair of functions gets or sets the timezone identifier. Full documentation: http://php.net/date_default_timezone_set and http://php.net/date_default_timezone_get . Parse any English string representation of time and produce a time stamp: $timestamp = strtotime($english_time); This function can take nearly any string containing a textual description of a date and time, in English, and produce the corresponding time stamp. Full documentation: http://php.net/strtotime 05_0672328887_CH03.qxd 6/8/06 2:38 PM Page 59 3.1 Calculating the Difference Between Two Dates 59 . Validate a date against the Gregorian calendar: $isvalid = checkdate($month, $day, $year); Returns true if the specified date can be found on the Gregorian calendar. Useful to make sure that user input or calculated time is valid. Full documentation: http://php.net/checkdate . Find sunrise and sunset times for a given position: $time_rise = date_sunrise($day_ts, SUNFUNCS_RET_TIMESTAMP, $latitude, $lon- gitude); $time_set = date_sunset($day_ts, SUNFUNCS_RET_TIMESTAMP, $latitude, $longi- tude); This pair of functions returns the time of sunrise and sunset at the specified location. The con- stant, SUNFUNCS_RET_TIMESTAMP, tells the function to return the time as a time stamp. Full documentation: http://php.net/date_sunrise and http://php.net/date_sunset . Convert a date between different calendars and Julian Day Count: $jday_count = cal_to_jd($calendar, $month, $day, $year); $date_array = cal_from_jd($jday_count, $calendar); This pair of functions converts a date, in a specified calendar system, to and from a Julian Day Count. These are useful for converting dates from one calendar to another. The supported calendar systems are CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH, and CAL_FRENCH. Full documentation: http://php.net/cal_to_jd and http://php.net/cal_from_jd 3.1 Calculating the Difference Between Two Dates Finding the number of weeks, days, or even seconds between two dates is something that programs regularly need to do. Often a database will have powerful built-in procedures for comparing dates and doing date arithmetic. In PHP,though, you need to handle this yourself. As discussed in the introduction, PHP deals with dates in UNIX epoch format.This means that all dates are stored as the number of seconds since midnight, January 1, 1970. This makes it easy if you just need to know the number of seconds that have passed between two points in time.All you need to do is subtract the two values. However, doing the more common “days between” type arithmetic takes some extra care. While doing date math, you need to keep leap years, months with different numbers of days, months with a fifth week, years with a 53rd week, daylight savings time, and all other such variations in mind. Otherwise, you may find yourself with an algorithm that only works most of the time. Let’s begin with a look at the common problem of finding the number of days between two dates. In Listing 3.1.1, note that we will use the powerful function strtotime() to make the PHP date stamps for ourselves.This function takes many different forms of text representations of dates and converts them into a time stamp for you. 05_0672328887_CH03.qxd 6/8/06 2:38 PM Page 60 60 Chapter 3 Time and Date Note Since PHP 5.1 you must make a call to date_default_timezone_set() to specify what time zone you want calculations to take place in before calling any date functions. Otherwise, STRICT mode errors are generated as it tries to guess the appropriate time zone. More information about time zones is presented in section 3.4, “Handling Time Zones,” later in this chapter. If your code needs to run on both PHP 5.0 and PHP 5.1 systems, you will have a little bit of a problem because these functions don’t exist in PHP 5.0. Therefore, you can use the function function_exists() to check whether date_default_ timezone_set() exists, and if so, call it. Alternatively, the default time zone can be set in your PHP configuration file in the PHP 5.1 server and then you don’t need to worry about it. Listing 3.1.1 Number of Days Between Two Dates <?php // Set the default timezone to US/Eastern date_default_timezone_set('US/Eastern'); // Will return the number of days between the two dates passed in function count_days($a, $b) { // First we need to break these dates into their constituent parts: $a_parts = getdate($a); $b_parts = getdate($b); // Now recreate these timestamps, based upon noon on each day // The specific time doesn't matter but it must be the same each day $a_new = mktime(12, 0, 0, $a_dt['mon'], $a_dt['mday'], $a_dt['year']); $b_new = mktime(12, 0, 0, $b_dt['mon'], $b_dt['mday'], $b_dt['year']); // Subtract these two numbers and divide by the number of seconds in a // day. Round the result since crossing over a daylight savings time // barrier will cause this time to be off by an hour or two. return round(abs($a_new - $b_new) / 86400); } // Prepare a few dates $date1 = strtotime('12/3/1973 8:13am'); $date2 = strtotime('1/15/1974 10:15pm'); $date3 = strtotime('2/14/2005 1:32pm'); // Calculate the differences, they should be 43 & 11353 echo "<p>There are ", count_days($date1, $date2), " days.</p>"; echo "<p>There are ", count_days($date2, $date3), " days.</p>"; ?> You might think that this would be a simple problem. Subtract the two numbers and divide by the number of seconds in a day.This is true and would work, if you were 05_0672328887_CH03.qxd 6/8/06 2:38 PM Page 61 3.2 Determining Last Day of a Given Month 61 interested in a pure mathematical definition of a day. However, think about having two dates, such as November 11 at 11:00 p.m. and November 12 at 1:00 a.m.To the way we think about dates, there is one day between these dates. However, if you just divided as discussed previously, you would end up with only a two-hour difference. The solution is to recalculate the dates you are given to a set time of day, say noon.
Recommended publications
  • Debates in the Digital Humanities This Page Intentionally Left Blank DEBATES in the DIGITAL HUMANITIES
    debates in the digital humanities This page intentionally left blank DEBATES IN THE DIGITAL HUMANITIES Matthew K. Gold editor University of Minnesota Press Minneapolis London Chapter 1 was previously published as “What Is Digital Humanities and What’s It Doing in English Departments?” ADE Bulletin, no. 150 (2010): 55– 61. Chap- ter 2 was previously published as “The Humanities, Done Digitally,” The Chron- icle of Higher Education, May 8, 2011. Chapter 17 was previously published as “You Work at Brown. What Do You Teach?” in #alt- academy, Bethany Nowviskie, ed. (New York: MediaCommons, 2011). Chapter 28 was previously published as “Humanities 2.0: Promises, Perils, Predictions,” PMLA 123, no. 3 (May 2008): 707– 17. Copyright 2012 by the Regents of the University of Minnesota all rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Published by the University of Minnesota Press 111 Third Avenue South, Suite 290 Minneapolis, MN 55401- 2520 http://www.upress.umn.edu library of congress cataloging-in-publication data Debates in the digital humanities / [edited by] Matthew K. Gold. ISBN 978-0-8166-7794-8 (hardback)—ISBN 978-0-8166-7795-5 (pb) 1. Humanities—Study and teaching (Higher)—Data processing. 2. Humanities —Technological innovations. 3. Digital media. I. Gold, Matthew K.. AZ182.D44 2012 001.3071—dc23 2011044236 Printed in the United States of America on acid- free paper The University of Minnesota is an equal- opportunity educator and employer.
    [Show full text]
  • The Evolution of the Unix Time-Sharing System*
    The Evolution of the Unix Time-sharing System* Dennis M. Ritchie Bell Laboratories, Murray Hill, NJ, 07974 ABSTRACT This paper presents a brief history of the early development of the Unix operating system. It concentrates on the evolution of the file system, the process-control mechanism, and the idea of pipelined commands. Some attention is paid to social conditions during the development of the system. NOTE: *This paper was first presented at the Language Design and Programming Methodology conference at Sydney, Australia, September 1979. The conference proceedings were published as Lecture Notes in Computer Science #79: Language Design and Programming Methodology, Springer-Verlag, 1980. This rendition is based on a reprinted version appearing in AT&T Bell Laboratories Technical Journal 63 No. 6 Part 2, October 1984, pp. 1577-93. Introduction During the past few years, the Unix operating system has come into wide use, so wide that its very name has become a trademark of Bell Laboratories. Its important characteristics have become known to many people. It has suffered much rewriting and tinkering since the first publication describing it in 1974 [1], but few fundamental changes. However, Unix was born in 1969 not 1974, and the account of its development makes a little-known and perhaps instructive story. This paper presents a technical and social history of the evolution of the system. Origins For computer science at Bell Laboratories, the period 1968-1969 was somewhat unsettled. The main reason for this was the slow, though clearly inevitable, withdrawal of the Labs from the Multics project. To the Labs computing community as a whole, the problem was the increasing obviousness of the failure of Multics to deliver promptly any sort of usable system, let alone the panacea envisioned earlier.
    [Show full text]
  • Open Geospatial Consortium
    Open Geospatial Consortium Submission Date: 2016-08-23 Approval Date: 2016-11-29 Publication Date: 2016-01-31 External identifier of this OGC® document: http://www.opengis.net/doc/geosciml/4.1 Internal reference number of this OGC® document: 16-008 Version: 4.1 Category: OGC® Implementation Standard Editor: GeoSciML Modelling Team OGC Geoscience Markup Language 4.1 (GeoSciML) Copyright notice Copyright © 2017 Open Geospatial Consortium To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. IUGS Commission for the Management and Application of Geoscience Information, Copyright © 2016-2017. All rights reserved. Warning This formatted document is not an official OGC Standard. The normative version is posted at: http://docs.opengeospatial.org/is/16-008/16-008.html This document is distributed for review and comment. This document is subject to change without notice and may not be referred to as an OGC Standard. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation. Document type: OGC® Standard Document subtype: Document stage: Approved for Publis Release Document language: English i Copyright © 2016 Open Geospatial Consortium License Agreement Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.
    [Show full text]
  • The UNIX Time- Sharing System
    1. Introduction There have been three versions of UNIX. The earliest version (circa 1969–70) ran on the Digital Equipment Cor- poration PDP-7 and -9 computers. The second version ran on the unprotected PDP-11/20 computer. This paper describes only the PDP-11/40 and /45 [l] system since it is The UNIX Time- more modern and many of the differences between it and older UNIX systems result from redesign of features found Sharing System to be deficient or lacking. Since PDP-11 UNIX became operational in February Dennis M. Ritchie and Ken Thompson 1971, about 40 installations have been put into service; they Bell Laboratories are generally smaller than the system described here. Most of them are engaged in applications such as the preparation and formatting of patent applications and other textual material, the collection and processing of trouble data from various switching machines within the Bell System, and recording and checking telephone service orders. Our own installation is used mainly for research in operating sys- tems, languages, computer networks, and other topics in computer science, and also for document preparation. UNIX is a general-purpose, multi-user, interactive Perhaps the most important achievement of UNIX is to operating system for the Digital Equipment Corpora- demonstrate that a powerful operating system for interac- tion PDP-11/40 and 11/45 computers. It offers a number tive use need not be expensive either in equipment or in of features seldom found even in larger operating sys- human effort: UNIX can run on hardware costing as little as tems, including: (1) a hierarchical file system incorpo- $40,000, and less than two man years were spent on the rating demountable volumes; (2) compatible file, device, main system software.
    [Show full text]
  • TIMEDATE Time and Date Utilities
    §1 TIMEDATE INTRODUCTION 1 1. Introduction. TIMEDATE Time and Date Utilities by John Walker http://www.fourmilab.ch/ This program is in the public domain. This program implements the systemtime class, which provides a variety of services for date and time quantities which use UNIX time t values as their underlying data type. One can set these values from strings, edit them to strings, convert to and from Julian dates, determine the sidereal time at Greenwich for a given moment, and compute properties of the Moon and Sun including geocentric celestial co-ordinates, distance, and phases of the Moon. A utility angle class provides facilities used by the positional astronomy services in systemtime, but may prove useful in its own right. h timedate_test.c 1 i ≡ #define REVDATE "2nd February 2002" See also section 32. 2 PROGRAM GLOBAL CONTEXT TIMEDATE §2 2. Program global context. #include "config.h" /∗ System-dependent configuration ∗/ h Preprocessor definitions i h Application include files 4 i h Class implementations 5 i 3. We export the class definitions for this package in the external file timedate.h that programs which use this library may include. h timedate.h 3 i ≡ #ifndef TIMEDATE_HEADER_DEFINES #define TIMEDATE_HEADER_DEFINES #include <stdio.h> #include <math.h> /∗ Make sure math.h is available ∗/ #include <time.h> #include <assert.h> #include <string> #include <stdexcept> using namespace std; h Class definitions 6 i #endif 4. The following include files provide access to external components of the program not defined herein. h Application include files 4 i ≡ #include "timedate.h" /∗ Class definitions for this package ∗/ This code is used in section 2.
    [Show full text]
  • Julian Day from Wikipedia, the Free Encyclopedia "Julian Date" Redirects Here
    Julian day From Wikipedia, the free encyclopedia "Julian date" redirects here. For dates in the Julian calendar, see Julian calendar. For day of year, see Ordinal date. For the comic book character Julian Gregory Day, see Calendar Man. Not to be confused with Julian year (astronomy). Julian day is the continuous count of days since the beginning of the Julian Period used primarily by astronomers. The Julian Day Number (JDN) is the integer assigned to a whole solar day in the Julian day count starting from noon Greenwich Mean Time, with Julian day number 0 assigned to the day starting at noon on January 1, 4713 BC, proleptic Julian calendar (November 24, 4714 BC, in the proleptic Gregorian calendar),[1] a date at which three multi-year cycles started and which preceded any historical dates.[2] For example, the Julian day number for the day starting at 12:00 UT on January 1, 2000, was 2,451,545.[3] The Julian date (JD) of any instant is the Julian day number for the preceding noon in Greenwich Mean Time plus the fraction of the day since that instant. Julian dates are expressed as a Julian day number with a decimal fraction added.[4] For example, the Julian Date for 00:30:00.0 UT January 1, 2013, is 2,456,293.520833.[5] The Julian Period is a chronological interval of 7980 years beginning 4713 BC. It has been used by historians since its introduction in 1583 to convert between different calendars. 2015 is year 6728 of the current Julian Period.
    [Show full text]
  • The UNIX Time-Sharing System
    t ·,) DRAFT The UNIX Time-Sha.ring Syste:n D. M. Ritchie 1· ~oduction UNIX is a general-purpose, multi-user time sharing system in- ) plernented on several Digital Equip~ent Corporation PDP series machines. UNIX was written by K. L. Tho::ipson, who also wrote many of the command prograns. The author of this meraorandurn contributed several of the major corilinands, including the assembler and tne debugger. The file system was originally designed by Thom?son, the author, and R.H. Canaday. There are two versions of UNIX. The first, which has been in ex- istence about a year, rtins on the PDP-7 and -9 coraput~rs; a more modern version, a few months old, uses the PD?-11. This docu,f'.ent describes U:-HX-11, since it is more modern and many of the dif- ferences between it and UNIX-7 result from redesign of features found to be deficient or lacking in the earlier system. Although the PDP-7 and PDP-11 are both small computers, the design of UNIX is amenable to expansion for use on more powerful machines. Indeed, UNIX contains a number of features w,~ry selc.om offered even by larger syste~s, including 1 o A versatile, conveni<?nt file system with co:nplete integra- tion between disk files and I/0 devices; .. - 2 - i " 2. The ability to initiate asynchrously running processes. It must be said, however, that the most important features of UNIX are its simplicity, elegance, and ease of use. Besides the system proper, the major programs available under UNIX are an assembler, a text editor based on QED, a symbolic debugger for examining and patching faulty programs, and " B " t a higher level language resembling BCPL.
    [Show full text]
  • Json Schema Unix Timestamp
    Json Schema Unix Timestamp Exposable Mustafa always disliking his wardenships if Armand is subjacent or pedestrianised scabrously. Is Erl permissive or self-rising when liquidizing some gigantism unbracing dreadfully? Index-linked Howie disfrocks mightily. UNIX timestamp when this file was last modified category string. JSON doesn't have a date data quickly so dates in Elasticsearch can either. Easy field use with code examples. Scalars Graphene-Python. Licensed works as unix timestamps and schema defined as a monthly run. UUID is encoded as text String. If terms have a JSON string length can parse it by using the json. Absolute timestamps specified in ISO601 format or as unix epoch milliseconds the now. String Understanding JSON Schema 70 documentation. Documents to a care in json schema validations cannot be stored in my worse and json! To are its publication, which may not be their memory by the rust of credit hours completed. Convert UNIX time as regular DateTime using C Convert leisure time field. All timestamp json typedef schemas this property of string representation, unix timestamps are all event occurred or list of a programming language is dd cc bb aaon disk. It is timestamp schema group of date and a string are timestamps. All of JSON's scalar types are supported including Number String Boolean values as well as Array an Object. Either seconds since unix timestamps are private docker options not be transferred to specify both seconds. Same property obtain a timestamp schema group of days in force following example app to trump a json functions, I should now able to explore CDAP datasets that return date on time fields.
    [Show full text]
  • AN0006: EFM32 Tickless Calendar with Temperature Compensation
    ...the world's most energy friendly microcontrollers Tickless Calendar with Temperature Compensation AN0006 - Application Note This application note describes how a tickless calendar based on the Real Time Counter for the EFM32 can be implemented in software. The calendar uses the standard C library time.h where an implementation of the time() function calculates the calendar time based on the RTC counter value. Software examples for the EFM32TG_STK3300, EFM32G_STK3700 and EFM32_Gxxx_STK Starter Kits are included. This application note includes: • This PDF document • Source files (zip) • Example C-code • Multiple IDE projects 2013-11-15 - an0006_Rev2.05 1 www.silabs.com ...the world's most energy friendly microcontrollers 1 Tickless Calendar 1.1 General Many microcontroller applications need to keep track of time and date with a minimum current consumption. This application note describes a possible software implementation of a low current tickless calendar on the EFM32. 2013-11-15 - an0006_Rev2.05 2 www.silabs.com ...the world's most energy friendly microcontrollers 2 Software 2.1 C Date and Time Standard C contains date and time library functions that are defined in time.h. These functions are based on Unix time, which is defined as a count of the number of seconds passed since the Unix epoch (midnight UTC on January 1, 1970). More on Wikipedia [http://en.wikipedia.org/ wiki/Unix_time]. A key component in this library is the time() function that returns the system time as Unix time. The library also contains functions to convert Unix time to human readable strings, and to convert a Unix time to a calendar time and date structure and the other way around.
    [Show full text]
  • The Evolution of the Unix Time-Sharing System*
    The Evolution of the Unix Time-sharing System* Dennis M. Ritchie Bell Laboratories Murray Hill, New Jersey 07974 ABSTRACT This paper presents a brief history of the early development of the Unix operating system. It concentrates on the evolution of the file system, the process-control mechanism, and the idea of pipelined commands. Some atten- tion is paid to social conditions during the development of the system. Introduction During the past few years, the Unix operating system has come into wide use, so wide that its very name has become a trademark of Bell Laboratories. Its important characteristics have become known to many people. It has suffered much rewriting and tinkering since the first pub- lication describing it in 1974 [1], but few fundamental changes. However, Unix was born in 1969 not 1974, and the account of its development makes a little-known and perhaps instructive story. This paper presents a technical and social history of the evolution of the system. Origins For computer science at Bell Laboratories, the period 1968-1969 was somewhat unsettled. The main reason for this was the slow, though clearly inevitable, withdrawal of the Labs from the Multics project. To the Labs computing community as a whole, the problem was the increasing obviousness of the failure of Multics to deliver promptly any sort of usable system, let alone the panacea envisioned earlier. For much of this time, the Murray Hill Computer Center was also running a costly GE 645 machine that inadequately simulated the GE 635. Another shake-up that occurred during this period was the organizational separation of computing services and com- puting research.
    [Show full text]
  • Time Ontology Extended for Non-Gregorian Calendar Applications
    Time Ontology Extended for Non-Gregorian Calendar Applications Simon J D Cox CSIRO Land and Water, PO Box 56, Highett, Vic. 3190, Australia [email protected] Abstract. We extend OWL-Time to support the encoding of temporal position in a range of reference systems, in addi- tion to the Gregorian calendar and conventional clock. Two alternative implementations are provided: as a pure extension or OWL-Time, or as a replacement, both of which preserve the same representation for the cases origi- nally supported by OWL-Time. The combination of the generalized temporal position encoding and the temporal interval topology from OWL-Time support a range of applications in a variety of cultural and technical settings. These are illustrated with examples involving non-Gregorian calendars, Unix-time, and geologic time using both chronometric and stratigraphic timescales. Keywords: temporal reference system, calendar, temporal topology, ontology re-use 1. Introduction (defined as 1950 for radiocarbon dating [14]), or named periods associated with specified correlation OWL-Time [6] provides a lightweight model for markers [4,5,8]. the formalization of temporal objects, based on Al- Since OWL-Time only allows for Gregorian dates len’s temporal interval calculus [1]. Developed pri- and times, applications that require other reference marily to support web applications, date-time posi- systems must look elsewhere. However, the basic tions are expressed using the familiar Gregorian cal- structures provided by OWL-Time are not specific to endar and conventional clock. a particular reference system, so it would be prefera- Many other calendars and temporal reference sys- ble to use them in the context of a more generic solu- tems are used in particular cultural and scholarly con- tion.
    [Show full text]
  • Gregorian Calendar - Wikipedia
    12/2/2018 Gregorian calendar - Wikipedia Gregorian calendar The Gregorian calendar is internationally the most widely used civil calendar.[1][2][Note 1] It is named after Pope Gregory 2018 in various calendars XIII, who introduced it in October 1582. Gregorian 2018 [3] It was a refinement to the Julian calendar involving an approximately 0.002% correction in the length of the calendar calendar MMXVIII year. The motivation for the reform was to stop the drift of the calendar with respect to the equinoxes and solstices— Ab urbe 2771 particularly the northern vernal equinox, which helps set the date for Easter. Transition to the Gregorian calendar would condita restore the holiday to the time of the year in which it was celebrated when introduced by the early Church. The reform was Armenian 1467 adopted initially by the Catholic countries of Europe. Protestants and Eastern Orthodox countries continued to use the calendar ԹՎ ՌՆԿԷ traditional Julian calendar and adopted the Gregorian reform, one by one, after a time, at least for civil purposes and for the sake of convenience in international trade. The last European country to adopt the reform was Greece, in 1923. Many (but Assyrian 6768 not all) countries that have traditionally used the Julian calendar, or the Islamic or other religious calendars, have come to calendar adopt the Gregorian calendar for civil purposes. Bahá'í 174–175 calendar The Gregorian reform contained two parts: a reform of the Julian calendar as used prior to Pope Gregory XIII's time, and a reform of the lunar cycle used by the Church with the Julian calendar to calculate the date of Easter.
    [Show full text]