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}";
}
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 trying to find the same day of week from last month if today's date is Wednesday Oct 2nd 2019. I need to retrieve Wednesday Sept 4th 2019.
I am using Carbon and have tried subDays(30) and subMonth(1) but that obviously doesn't return the same week day.
SalesLogs::loadByDate(Carbon::now()->subMonth(1));
This code works as expected, however I am unable to work out how to make it find the same day of the week based on the prior month.
It's not super clear what you are trying to do, but I will take a shot at it. What about if you subtract a month, and then go to the next matching weekday?
$weekday = now()->dayOfWeek;
SalesLogs::loadByDate(now()->subMonth(1)->next($weekday));
Note: you can take advantage of Laravel's handy now() helper function, which is equal to Carbon::now(), but saves you from having to import Carbon.
Does that get you what you need?
I am using Selenium IDE plugin and I want to select a future date which is 14 days from today's date. The only way I can do that is using the calendar pop-up. I have used a variable to store setdate+14 function, but I am unable to understand how can I used this date to choose from the calender?
Also, how can I navigate to next month when the current date is more than 16/ 17th of the current month.
Thanks
I am trying to build an application that displays a weekly Monday to Friday school schedule. I've decided to use the JQuery plugin fullcalendar. After looking through many options, I cannot find a way to display a weekly mode rather than actual days of the year. Agenda mode displays a given week of the year. This includes dates which I don't want.
I want events to begin on Friday at 2:00pm not April 5 at 2:00pm
Is there way to do this using the fullcalendar API?
Take a look at the columnFormat option. http://arshaw.com/fullcalendar/docs/text/columnFormat/
columnFormat: {
month: 'ddd',
week: 'ddd',
day: 'dddd M/d'
}
Let me know if this helps.
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.