Php Date 6 Months Ago

0 views
Skip to first unread message

Armonia Bunda

unread,
Aug 4, 2024, 4:47:14 PM8/4/24
to varbayripe
Asfar as we know, months were first used in Mesopotamia sometime between the years 500 BCE and 400 BCE to measure the natural period related to the lunar month, or synodic month, which is the time it takes for the Moon to go through all the Moon phases.

Our current Gregorian calendar and its predecessor, the Julian calendar, both have 12 months. However, the month names we use today are derived from the Roman calendar, which initially had only 10 months, with the calendar year starting in March (Martius).


The Romans named some of the months after their position in the calendar year: September means the 7th month, October the 8th, November the 9th, and December the 10th month. However, when January and February were eventually added and the beginning of the calendar year was moved to January, the position of these months no longer corresponded with the original meaning of their names. Today, we still call the 9th month of the year September, the 7th month.


The Islamic calendar, the Hebrew calendar, and the Hindu calendar also use months to divide up the year. Although the Gregorian calendar is the most commonly used calendar today, other calendars are still used in many parts of the world to calculate certain holidays and annual feasts.


The Gregorian calendar is the most prevalently used calendar today. Within this calendar, a standard year consists of 365 days with a leap day being introduced to the month of February during a leap year. The months of April, June, September, and November have 30 days, while the rest have 31 days except for February, which has 28 days in a standard year, and 29 in a leap year.


The Gregorian calendar is a reformed version of the Julian calendar, which was itself a modification of the ancient Roman calendar. The ancient Roman calendar was believed to be an observational lunar calendar, based on the cycles of the moon's phases. The Romans were then believed to have adopted a 10-month calendar with 304 days, leaving the remaining 50 or so days as an unorganized winter. This calendar allowed the summer and winter months to become completely misplaced, leading to the adoption of more accurate calendars.


The Republican calendar later used by Rome followed Greek calendars in its assumptions of 29.5 days in a lunar cycle and 12.5 synodic months in a solar year, which align every fourth year upon the addition of the intercalary months of January and February. From this point, many attempts were made to align the Republican calendar with the solar year including the addition of an extra month to certain years to supplant the lack of days in a particular year. In 46 BC, the calendar was further reformed by Julius Caesar, introducing an algorithm that removed the dependence of calendars from the observation of the new moon. In order to accomplish this, Caesar inserted an additional 10 days into the Republican calendar, making the total number of days in a year 365. He also added the intercalation of a leap day every fourth year, all in an attempt to further synchronize the Roman calendar with the solar year.


Despite all efforts, the Julian calendar still required further reform, since the calendar drifted with respect to the equinoxes and solstices by approximately 11 minutes per year. By 1582, this resulted in a difference of 10 days from what was expected. Pope Gregory XIII addressed this by essentially skipping 10 days in the date, making the day after October 4, 1582, October 15. An adjustment was also made to the algorithm of the Julian calendar that changed which century years would be considered leap years. Under the Gregorian calendar, century years not divisible by 400 would not be leap years. These changes reduced the error from 1 day in 128 years, to 1 day in 3,030 years with respect to the current value of the mean solar year.


The adoption of the Gregorian calendar occurred slowly over a period of centuries, and despite many proposals to further reform the calendar, the Gregorian Calendar still prevails as the most commonly used dating system worldwide.


A holiday is a day that, either by custom or by law, is set aside such that regular activities like going to work or school are suspended, or at least reduced. The term "holiday" can be interpreted differently, depending on the region. In the U.S., paid leave is typically referred to as "vacation," while national, religious, or cultural days off are referred to exclusively as "holiday." In some regions, however, such as the United Kingdom or former British colonies, the term holiday can also refer to paid leave.


Generally, holidays are meant to commemorate some event, person, or group of cultural or religious significance. Although certain holidays, such as Christmas and New Year's Day, are widely celebrated worldwide, most countries have their own set of holidays that are specific to the country, and even the same holidays may be observed differently within countries: some may receive a full suspension of typical daily activities, while others may only get partial days off. Certain countries have holidays that essentially shut down almost all businesses. As an example, in Brazil, Carnaval do Brasil results in almost a full week in which only industrial production, retail establishments, or carnival-related businesses, function.


This calculator is mainly geared towards U.S. holidays, but holidays specific to a given country can be entered manually. Certain holidays can also be excluded. For a further level of specificity, federal holidays in the U.S. refer to holidays that have been recognized by the U.S. government; on these days, non-essential federal government offices are closed, and all federal employees receive paid leave. This is not necessarily true in the private sector, however, and which federal holidays a private sector employee receives is largely dependent on the discretion of the company. In some cases, an employee who is required to work on a federal holiday may receive compensation in the form of holiday pay in addition to their regular wages.


Certain holidays such as New Year's Day are referred to as "fixed holidays," since they fall on the same date every year. Others, such as the birthday of Martin Luther King, Jr., don't have a fixed date, because they occur on a "floating Monday"; in this particular case, the holiday occurs on the third Monday of January. Another widely observed holiday in the U.S., Thanksgiving, occurs on a "floating Thursday," the fourth Thursday In November, hence the dates of these holidays vary by year.Below are two tables showing the dates of federal holidays in the U.S. for 2024 and 2025.


If its just visual, then a formula column could probably achieve this. If you need to build another automation or notification based off the number of months, then you will need to use apps like General Caster or Integromat/Zapier.


It appears that it should work, but it does not work when I try it in Smartsheet. I believe it may be because my date format isn't what's needed for this type of formula. So now I'm tasked with trying to re-format the date column (using a helper column) into a format that will allow me to use the above formula. Can someone help me with this?


My apologies... I did indeed neglect to include the issue of spanning years; this should fix that issue. I also discovered a couple of issues that could crop up if the result happened to fall in December that have now been fixed also. I have tested this and I can find no problems, but please let me know if I missed something.


@Carson Penticuff, thanks for your thoughtful response! You've brought up an interesting point. It appears in the excel formula I'd like to use, it simply adds to the month number, but will increase the year after hitting the 12th month... But I didn't consider the day implications - if my start date is on the 31st, you can't simply add months as not all months have 31 days.


I agree with your preference. If the above instance occurs, than we should "pull back" to the last valid day of said month. I think my simple formula just got much more complicated! Is this something you can help with?


I was working on this before I saw your comment. This will basically add the number of months, and if the result is an invalid day, will add the number of additional days, throwing it into the next month. This is probably the "easiest" solution to implement. Pulling the date back to the last day of the previous month will be a little harder. You can take this for a test drive, and we can adjust if needed.


Thanks for this! I've entered your proposed formula with the result "#INCORRECT ARGUMENT SET". This is way beyond my formula knowledge, so I have no idea what may be wrong at this point. I did notice that my Month column was labeled "Payment Term (Months)"... the parenthesis may have been causing issues with the formula, so I removed the parenthesis, but that didn't seem to completely solve it. Any idea what might be wrong? I so appreciate your help!


Does it matter that the Payment Start Date column is a "date" column and not text? When I changed the column type to text, the formula cell went blank. No error message, just blank. Oh, I see, using "ISDATE" works with date-type columns? Then, I still have the same question/suspicion: do I need to reformat the date somehow in a helper column to make this formula work? Does it instead need to be in a 01-Jan-22 type of format, similar to the original formula I was trying to use?


Could you please help me with basically the same, but with days? I have a date column, Initiation Date, and an interval column with a formula that returns 7 or 30 days, depending on another factor, and I want to add the two together, but when I do =([Initiation Date]@row ( example-8/10/23) + Interval I am getting 8/10/2030 instead of 9/20/2023. I've tried several different things but I can't get it to work.


The ISDATE() is checking to make sure there is actually a date entered in the column. [Payment Start Date] must be a date column for this to work. As far as specific formatting, it really doesn't matter. 1/1/23 vs Jan. 1 2023 etc etc are for visual representation only. Smartsheet treats them all the same in the background. The column you place this formula into must also be formatted as a date, as that is the expected return.

3a8082e126
Reply all
Reply to author
Forward
0 new messages