I was wondering if it is possible to make Outlook change the default signature based on the date e.g. when it is 14th Feb, change the signature to a pre-made Valentine's Day one, when it is 25th Dec, make it a Christmas one?
Related
Part of my program requires checking the day of the week that a file was created. I have an input attribute which gives the date of creation in US form (month/day/year). However I do not have the day of the week.
As per the sadism of the legal department I am also restricted to only the time modules within python's standard library so unfortunately the obvious solution of PYTZ is not an option.
My current approach is to use the date to reference the Gregorian calendar. On the assumption that a the same date is always the same day i.e. 1st September 2022 is a Thursday everywhere in the world. However, I have not been able to validate this assumption.
If you know if this assumption is correct/incorrect and/or know of somewhere I can find out I would be very grateful.
Thanks.
I am using Kendo UI scheduler to show my events and I have events that should be shown for each year on a specific date.
To achieve that, I use yearly reference rule and everything works fine until event's date is not 29th February. In that case my event get's pushed to the March 1st, even if current year has that date.
The only case in which my date doesn't get pushed to 1st March is if event's date is set to 29th February of the current year.
Is there any way to handle this as I didn't find any info regarding leap
years in the Kendo UI documentation?
According to telerik, currently it can be done only by using more specific recurrence rule.
For 29th February that would be: "FREQ=YEARLY;BYMONTH=2;BYMONTHDAY=29".
My solution was to generate specific recurrence rule for each record by using following method:
private string GenerateEventYearlyRecurrenceRule(DateTime eventStart)
{
return $"FREQ=YEARLY;BYMONTH={eventStart.Month};BYMONTHDAY={eventStart.Day}";
}
Recently i was working with unit testing for my project.
I've given a task to test the method. The method should return the recent quarter date as per the current system date.
So, I've called the current system date using the following c# code:
string currentYear = DateTime.Now.ToString();
When i run the query it worked as expected.
So, its time for my tactics to raise a bug for that method. Hence I've changed the system date to 10/01/14 (dd/mm/yy).
Also I've customized current system date format to only keep last two digits of the year.
Ex: if year is 2014 the it shows only 14.
You can observe the short date and the long date in the following image.
When i run/debug the test in Visual Studio 2012, it still displays as 2014 as the current system date though I've modified it to 14.
Question: The real question is how did the system/program took the current year as 2014 even the system date is changed to 14. It may be silly but my doubt is Why it is not 1914 or 1814 and why it is 2014 ?.
Where did it store the current date or year information ? Does windows manage this stuff or did the C# taken care of the date ?
The real question is how did the system/program took the current year as 2014 even the system date is changed to 14. It may be silly but my doubt is Why it is not 1904 or 1804 and why it is 2014 ?.
C# only retrieved the date from the system, it was Windows that determined what data to send.
In the case of two-digit dates, Windows allows you to define what they mean in the Regional and Language applet in the Control Panel. This way you can specify the range you want it to represent depending on your usage.
The display of a date is not how it is stored, just how it is displayed.
January, 1st, 2014 may have a multitude of different formats, e.g.
2014-01-01
01-01-2014
01-01-14
1/1/14
Jan/1/14
001-2014
But all are held internally exactly the same way.
Note the advanced settings on your screenshot - this will indicate to many windows programs how to interpret a year entered as 2 digits, so it knows if it should regard a date entered as XX as 19XX or 20XX - this will cover manually entered dates, not the system date
Your C# application didn't store that date, Windows handled it for you.
As Sean mentioned, by changing from YYYY to YY you only changed how the date is displayed, not how it is stored. Windows doesn't store its system time information into a specific date format. Instead, it records the number of 100-milisecond intervals since 00:00 January 1st, 1601. That way it keeps the tracking of time independent of how it's displayed and allows you to display the date and time in a number of different formats.
As a curiosity, that specific date was chosen because the Gregorian calendar operates on a 400-year cycle (when it starts to repeat itself) and 1601 was the first year of the cycle that was active when Windows NT was being developed.
On a side note, Unix systems store that information as Unix Time or POSIX Time, counting the number of seconds elapsed since 00:00 January 1st 1970.
When you set the format property for a Date/Time field in a table to a Long Date, switch to Datasheet view, then click inside the Date/Time field, the format does not disappear anymore as in older versions of Access. You cannot edit the date since you do not see the original data.
Here is what I have: Date value: 11/26/2012
Long Date format: Monday, November 26, 2012
Field receive focus: Monday, November 26, 2012
When you are in Datasheet view, select the field (click inside), the format remains. In Access 2003 (under Win XP), the format disappears and the value 11/26/2012 is displayed. I have just verified this today. For text and number fields, the format goes away when the field receive focus.
When you add a time component other than midnight(00:00) than it works as expected:
Date value: 11/26/2012 01:00
Long Date format: Monday, November 26, 2012
Field receive focus: 11/26/2012 01:00
It seems that this is a bug of some sort, unless I am missing something here. May be it has to do with the Date Picker control (I turned it on and off, no change in behavior).
Access 2010 runs under Win 7, Access 2003 runs under Win XP.
Could anyone confirm this behavior and/or provide more guidance on how to handle this?
Thanks,
I'm writing an app that relies on the calendar and calendar events to display data to the user.
I need to be able to let the user select the beginning of his/her 'fiscal' year in settings, which will be the 1st of any of the 12 months. This is an app for military users, and any given unit's fiscal year can begin on whatever month their unit (base) decides.
The data I'm displaying to the user needs to be divided into 'fiscal' quarters according to the user's setting of the beginning of the fiscal year, not calendar year.
I'm not having problems retrieving, editing or deleting the events, I can't figure out how to change the beginning of the year to anything besides Jan 1st.
I found NSDateCategoryForReporting on GitHub, that seems like it's exactly what I need, but how do I tell it that the year begins on the 1st of x month?
iOS doesn't natively support this, so you'll have to find a plugin to do this or write your own. Your best bet is to write a class that performs the date conversions using the standard NSDate, NSCalendar, etc.
For instance, you could store what day the user specifies as their starting fiscal year. Then you can calculate the number of days difference between that and January 1st, and just shift dates based on that.