Calendar library customisation advice - codeigniter

CodeIgniter has a nice calendar library, but my calendar requirements are a little specific. I would need to display only calendar dates for a range of specific days. For example, Mondays, or Mondays and Fridays, or just weekdays.
For example, Mondays for this month would look like;
<< Mondays in April >>
[4] [11] [18] [25]
I've read the docs and looked at some tutorials, but haven't learned how to do this myself.
Does anyone have any ideas about how to do this with the existing calendar library, or would it be better to build something like this from scratch?
Thanks.

You could use your own made template and extend Calendar class, but It would be troublesome. I think Codeigniter doesn't have the right tool straight of the box for your situation. I would propose calendR. I would parse desired month and took f.e. mondays using API, especially CalendR\Period\Day which has constant MONDAY.

Related

Automator Service for Notes + Calendar

I've been trying to figure this out for a while. Is there a way to set up a service that would parse a Note and create calendar events based on each line from that Note?
For example, say that the contents of my note are as follows:
December 1 9:00AM - 5:00PM
December 2 9:00AM - 5:00PM
December 3 11:30AM - 8:00PM
Is anyone familiar with how to parse this? I'd like to set up a service that would take those dates, and those hours and create calendar events with a default name (ex. "Work"). I'm familiar with how to do it in programming languages like Python or Swift, but I'm still new to scripting.
Any help would be appreciated. Thanks!

How to disable dates before today in DatePicker tool in Windows Phone? [duplicate]

First of, is there any real documentation of the toolkit ? What I would like is to specify a range of selectable dates. For example I don't want to display dates before today. If the user select a start date of Jan. 27th 2012, I want to allow only dates after these for the return date
Documentation is a little bit sparse for the toolkit - your best bet is to look in the source of the sample app but they don't cover all the scenarios.
The default control doesn't seem to support a minimum or maximum value for the selected date, but if you download the source you should be able to modify it according to your needs. The layout of the source is pretty straightforward and you should be able to find an acceptable place to add the code, the only thing you need to decide is how you handle it from a UI perspective. In my opinion, you are better off handling the range check once the control returns - if it is an invalid date, pop up a message and re-show the control.
I've found that in the absence of documentation, the WindowsPhoneGeek blog (in this specific case see link here) usually does a good job of explaining the Silverlight Toolkit components in their various articles.
These articles can be a great help when following ZombieSheep's advice of taking a look at the toolkit sample code.

Limit date range in a DatePicker

First of, is there any real documentation of the toolkit ? What I would like is to specify a range of selectable dates. For example I don't want to display dates before today. If the user select a start date of Jan. 27th 2012, I want to allow only dates after these for the return date
Documentation is a little bit sparse for the toolkit - your best bet is to look in the source of the sample app but they don't cover all the scenarios.
The default control doesn't seem to support a minimum or maximum value for the selected date, but if you download the source you should be able to modify it according to your needs. The layout of the source is pretty straightforward and you should be able to find an acceptable place to add the code, the only thing you need to decide is how you handle it from a UI perspective. In my opinion, you are better off handling the range check once the control returns - if it is an invalid date, pop up a message and re-show the control.
I've found that in the absence of documentation, the WindowsPhoneGeek blog (in this specific case see link here) usually does a good job of explaining the Silverlight Toolkit components in their various articles.
These articles can be a great help when following ZombieSheep's advice of taking a look at the toolkit sample code.

Time zone list issue

For my application, I'm importing the calendar event from google calendar. The only problem which I'm facing is Time zone list. I'm getting the timezone as output from google calendar xml, which I have to check with time zone list and add time accordingly... so from where I can get this standard time zone list.. or some other alternative to achieve the same.
If you're using Java, use Joda Time - the time zone ID given by Google Calendar will be one the Joda Time understands. The standard TimeZone class may well understand it too, but I think Joda is more likely to.
Assuming you're seeing all the VTIMEZONE stuff that goes along with the event, you can ignore the details - just use the ID.
Unfortunately there are some time zone IDs which have changed over time - I can't remember any examples off-hand, but you may need to do some translations if you're provided with the "old" names.
If you're using .NET, you really need to be using .NET 3.5 and the TimeZoneInfo class. Unfortunately that uses Windows names instead of Olson IDs, but there's a translation list available somewhere (I can dig it out if you want).
If you're not using either of these platforms, you basically need to find a library which supports Olson Zoneinfo names. (That wikipedia article has some helpful links at the bottom.)
I would definitely try to find a library which will be able to give you the relevant information based on an ID, rather than using the rules given back in the calendar entry. Time zones change over time, and the zoneinfo database contains historical and future information, but that can't be easily encoded in the calendar entry.
There are some good articles about working with Erlang date/time libraries here:
http://www.trapexit.org/Category:DateTimeRecipes
Hope it helps.
Check out these function
calendar:datetime_to_gregorian_seconds({Date, Time})
calendar:gregorian_seconds_to_datetime(Seconds) -> {Date, Time}
Converting to "gregorian seconds" and correcting the timezone-offset and converting back to date form is half the solution.
There is no library to access timezone datafiles in Erlang/OTP, and as far as I know there is no third part library to get at it either. So your options are to yourself convert the available timezone databases to something usable from Erlang, or to settle for just knowing a few of them.
You know, unless you want to start a project to read timezone data in Erlang. :-)

indian calendar needed

I want a 100 years calendar which shows certain Indian special days like Amavasya and Poornima.
I want to find the day for Poornima or Amavasya for example - in the year 1936. When was Shivratri aur janmasthami. I want to find day according to these specifications.
If there is a program that can do this, please let me know.
Thank you.
The amavasya and poornima (New Moon and Full Moon) are calculated based on a complex formula defined in below wiki. You can try developing a small program out of that. :-)

Resources