FAQ Database Discussion Community


Global database of “Business days” for several years and countries

java,scala,calendar,machine-learning
Define the type of concrete day (working / holiday) and length of working day (in some countries it can differ depends on day of week and official holidays) is real problem for software that interacts with banks / state institutions. Also it can be very useful in any kind of...

How to add a simple calendar to my windows store app

visual-studio-2013,calendar,windows-store-apps
I'm working on a Universal windows store app and I want to add a simple calendar so that users can add birthdays of their friends and save them and some other stuff. Is there any simple way to do this? PS: Using Visual Studio 2013...

Integrating angular calendar into an ionic app not working

angularjs,calendar,ionic
Hi I am trying to use the below calendar in an ionic app https://github.com/mattlewis92/angular-bootstrap-calendar my html <ion-view> <ion-content data-ng-controller="calenderController"> {{tester}} <mwl-calendar view="calendarView" current-day="calendarDay" events="events" view-title="calendarTitle" on-event-click="eventClicked(calendarEvent)" edit-event-html="'<i class=\'glyphicon glyphicon-pencil\'></i>'" delete-event-html="'<i class=\'glyphicon glyphicon-remove\'></i>'"...

Android, Listener/Observer/Callback on calendar event change

android,calendar,android-calendar,android-cursorloader,contentobserver
I am writing an application that needs to know when a meeting is added/removed/changed in the calendar. I know how to get all the data from a calendar using CursorLoader on the calendar uri. Also i know how to listen to calendar changes using the ContentObserver. The problem is that...

Java - current time in different time-zones

java,time,calendar,timezone,utc
I want to create a thread, that will write current time in difference zones every second. This is what I came up with: class TimeThread extends Thread { String city; String belt; public TimeThread(String city, String belt) { this.city = city; this.belt = belt; } @Override public void run() {...

Calendar View Or DatePicker always returning wrong month Android

android,view,calendar
Good Day guys.Im implemented first the date picker.Day and year was ok,but i noticed that date picker always returning INT of month wrong(always 1 month less) for example if todays month is MAY it counts like 5th of the year,date picker always returning 4 and so on.I though its issue...

Select year overview like columns

sql,sql-server,calendar
How can I create a select query to select every month and year column per column, so the result should be like this: http://www.google.de/url?source=imglanding&ct=img&q=http://www.calenweb.com/png/en/2015/2015-yearly-calendar.png&sa=X&ei=Ma1IVeHLLtHjavfsgfAI&ved=0CAkQ8wc&usg=AFQjCNHw0gwp3G9-bSGGNspsZJjMqZbjBA Of course, the format, colors... doesn't matter. Any ideas? Is the problem clear?...

Show more data in each event of DayPilot Lite Calendar - ASP.NET Webforms

asp.net,webforms,calendar,daypilot
In my DayPilot Calendar (Lite) it currently on shows data from one column from the database, which is set to the DataTextField. How do I add more data to each event so the user can look at more data from the database for each event? I currently have this set...

Next 2 hours using Calendar object/Java-Android

java,android,calendar
I want to capture the number of steps the user is doing for the next 2 hours. This is what I am putting. Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); Log.d("Calendar",calendar.getTime().toString()); long endTime = calendar.getTimeInMillis(); calendar.add(Calendar.HOUR_OF_DAY,2); long startTime = calendar.getTimeInMillis(); However the app is crashing giving me...

WIndows Phone 8.1 Calendar Events reading issue

c#,windows,windows-phone-8,calendar,phone
Hi i need to read calendar events from windows phone 8.1 . I implemented code using below link.But Phone hangs when i call the functionality. I add two events in calendar manually so i need to fetch those events. Any advise would be greatly appreciated. https://msdn.microsoft.com/en-us/library/windows/apps/hh286421(v=vs.105).aspx#BKMK_AccessingCalendarData...

Method to add Dates between 2 given dates?

java,calendar
I'm working on a method that can add dates like this : public static ArrayList<Calendar> addDaysBetween(Calendar day1, Calendar day2) Which returns the ArrayList containing all the dates between d1 & d2. So, first I needed to know how many days exists between those two dates (Followed this example : http://stackoverflow.com/a/28865648/4944071)...

How to format date-time for RFC2445 in PHP

php,calendar,rfc2445
I am working on Google Calendar API using its PHP library and I need to set a recurring event for which I have to create a RRule string which should be of following format: RRULE:FREQ=WEEKLY;UNTIL=20110701T170000Z I am unable to create the date in above format. I literally tried all methods...

SQLITE next 24 hours data

android,sqlite,calendar,timezone
i'm looking to select the next 24 hours games from my table: String sql = "SELECT * FROM teamstable WHERE ((teamdate >= datetime ('now')) AND (teamdate < datetime('now','+24 hours'))) ORDER BY teamdate" ; Cursor cursor = db.rawQuery(sql, null); but the result is strange because i have only tomorrow games: String...

Database design for recurring events with exceptions

sql,database,database-design,calendar,recurring-events
I'm building a system that needs to store/manage different types of events. For simplicity, I will focus on designing a calendar (I'm building something slightly different, but calendar is a good analogy and it's easy to reason about). I'd like to hear about possible database/schema design ideas. Problem Description I...

Setting an alarm based on date in database

java,android,date,calendar,android-alarms
I found a tutorial that helped me get a working alarm setup but in the tutorial we used a date picker to set the time of the alarm. All was going well, so I attempted to replace the date picker with a method of my own and set the alarm...

Java GregorianCalendar Fields

java,calendar
I try to convert a String to GregorianCalendar, and then check it. Below, I post my codes. I really confuse that why the fields seem wrong. Thanks a lot for help. public class test{ private static final ArrayList<String> MONTH_OF_YEAR = new ArrayList(Arrays.asList( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",...

Trouble comparing dates

java,android,calendar
I am having a problem with the following code that is supposed to print a message if a given day is today or tomorrow: if (dayOfMonth >= Calendar.DAY_OF_MONTH){ System.out.printl("Is today or tomorrow"); } If dayOfMonth is greater or equal to today's date, the message is printed. However, the condition always...

Generate Day start and Day end time between two dates in Java. Day light saving issue

java,date,datetime,calendar
I have to generate days between two two dates. for ex: 1420090495000 -> Jan 1, 2015 1430458495000 -> May 1, 2015 I have to generate timestamps for all days like Jan 1, 2015 00:00:00 - Jan 1, 2015 23:59:59 Jan 2, 2015 00:00:00 - Jan 2, 2015 23:59:59 Jan 3,...

WP8.1 Calendar look-alike

calendar,windows-phone-8.1
I'm searching for a WindowsPhone 8.1 Calendar look-alike. I don't want to store any data/appointments in it, I just want the monthly view as a date-picker control, as I do not like the normal date-picker. I came across WinRTXamlToolkit that does offer a calendar, but I don't like the style...

Android Calender dates persisting in a array

android,date,calendar
i Want to store last seven date in a array.Like Today's date is 16-03-2015 so from that date whatever the last seven date was, i want to store in a array.means i want to get the last seven date from the current date and want to store in a string...

Differentiate time spans between 8am-9am and 8pm-9pm, etc

c#,.net,datetime,calendar,timespan
I'm looking for a way to differentiate time spans, for example, between 8am-9am and 8pm-9pm, 10am-12pm and 10pm-12am, etc. in .NET. Since time is relative, I'm looking for a creative way on how to achieve this. Here's what I've tried so far: // 3:41pm - 4:41pm DateStart: 5/7/2015 3:41:41 PM...

PHP Calendar Pagination AJAX problems

php,ajax,calendar,singlepage
I'm trying to add AJAX pagination to my calendar, to avoid reloading the entire site as the calendar is located in a secondary tab, that reset to the primary tab on a reload. Usually my "NEXT MONTH"-button would be wrapped in a link, that refreshed the same page with a...

Android: How to change the color of the dateselector in Datepicker widget?

android,colors,datepicker,calendar,selector
this is my first time posting a question. I've successfully implemented a Datepicker in my app (targeting only SDK 21 and above). I also want to style my Datepicker to blend with the rest of the app. This is what I have: <style name="MyDatePickerDialogTheme" parent="Theme.AppCompat.Light.Dialog"> <item name="android:datePickerStyle">@style/MyDatePickerStyle</item> <item name="android:colorAccent">@color/primDark</item> </style>...

How to count business days from a given date in SQL Server using a calendar reference table

sql-server,date,count,calendar
I have two tables. One table is a Calendar that has a date column and a kindofday column. The kindofday column contains 'bankday', 'saturday', 'sunday' and 'holiday'. I need to account for holidays otherwise there are several queries on the net that would work... date kindofday 1999-08-24 00:00:00:000 bankday I'm...

Selecting multiple dates across multiple months in the asp calendar

c#,asp.net,web,calendar
I have encountered the following issue with asp calender. Currently, I am able to select multiple dates within the range (which I have set) which is within 1 month. However I am unable to get the correct selected dates if my range is within 2 months (cross month). Within 2...

Can't get recurrence API Google Calendar PHP

php,api,calendar,recurrence
I am trying to get the recurrence of an event with the Google Calendar API in PHP, and it doesn't show me the recurrence. The following code is the code I'm using: $params = array( 'orderBy' => 'startTime', 'singleEvents' => true, 'timeMin' => date('c'), ); $listarEventos = $service->events->listEvents($calendar_id, $params); foreach...

How to modify CodeIgniter calendar to handle multiple events per day?

php,codeigniter,calendar
I am creating a calendar without jquery calendar plugin. I could retrieve the data which is in the database to the calendar. But when there are multiple data per day only one data comes to the calendar view. I want it to be like this when there is multiple data....

Mapping XMLGregorianCalendar to Calendar with Dozer

java,date,calendar,dozer
Prerequisites Dozer 5.5.1 Code public class Testdata { public static final Calendar CALENDAR_EXPECTATION; public static final XMLGregorianCalendar XMLGREGORIANCALENDAR_INPUT; static { CALENDAR_EXPECTATION = Calendar.getInstance(TimeZone.getTimeZone("Europe/Paris"), Locale.GERMANY); CALENDAR_EXPECTATION.clear(); CALENDAR_EXPECTATION.set(2015, 1, 2, 13, 15, 22); XMLGREGORIANCALENDAR_INPUT = XMLGregorianCalendarImpl.createDateTime(2015, 1, 2, 13, 15, 22, 0, (CALENDAR_EXPECTATION.get(Calendar.ZONE_OFFSET) +...

java calendar add is not working

java,date,calendar,add
I used add method to add 3 days to calendar. but I found that It is not working correctly. Calendar.add(Calendar.DATE, 7); please let me know what is wrong. while(dateIdx < nowDate) { int tmpYear = startCal.get(Calendar.YEAR); int tmpMonth = startCal.get(Calendar.MONTH)+1; int tmpDay = startCal.get(Calendar.DAY_OF_WEEK); System.out.println(+tmpYear+tmpMonth+tmpDay+ "- "+tmpYear+tmpMonth+(tmpDay+6)); startCal.add(Calendar.DATE, 7); //used...

CalendarView close when I slide down

android,calendar,calendarview
I'm trying to set my calendar view and I have a problem. I set android standard CalendarView and it seems to behave ok, but there is one issue. The view close when I slide down to see the next month, with actual date picked. Can someone help me with this...

ng-change isn't working on my semi-custom calendar control

javascript,angularjs,twitter-bootstrap,calendar
For an app I'm working on, I may have coded myself into a corner. Among the technologies we're using on this project, are Angular.js, and UI Bootstrap. One of the first things I showed the team was the Calendar system in UI Bootstrap, and it was great! Except...it was way...

Change defaultDate after Calendar is created (fullcalendar)

javascript,jquery,calendar,fullcalendar,sapui5
I´m integrating the JavaScript Calendar, called fullcalendar ( fullcalendar page) into my SAPUI5 Webpage. The calendar runs in a specific tab. I now want to change the default date after the calendar was created, to display a specific month. setCalendar : function () { var that = this; if(!this.todayDate) {...

java last sunday of a month

java,date,calendar
I want to get the last sunday of any given month, and its working to a point however on some inputs if the sunday is the first day of next month it shows that date instead of the same month's last week. Here is what public static String getLastSunday(int month,...

Add Event to custom calendar crashed the application

ios,objective-c,calendar,eventkit
I am trying to add an event to custom calendar. To fetch the calendar list I used below EKEventStore *eventStore = [[EKEventStore alloc] init]; [eventStore requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) { if(!granted) { //error alert return; } NSArray *calendars = [eventStore calendarsForEntityType:EKEntityTypeEvent]; // List of all calendars // Let user...

How convert Gregorian to Chinese Lunar Calendar?

java,android,calendar
I want to build an android app using Greogorian Calendar to Chinese Lunar Calendar. I don't know how to convert from Gregorian to Chinese Calendar. How can I do this?...

Filtering Event List Google Calendar PHP

php,calendar,google-calendar,google-api-php-client
I am trying to fetch events that lie between certain user-given dates from a google calendar using the following code segment: form name="dates" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> Start: <input type="date" name="start"> End: <input type="date" name="end"> <br /> <input type="submit" name="submit" value="Anzeigen"> </form> <?php if(isset($_POST['submit'])) { echo "Dates were chosen:...

What method or class in Ruby can i use to add spaces between each date?

ruby,terminal,calendar
How can I shift each date/number or add white spaces for the numbers can go under the corresponding Day? Is there a class or method from ruby that i can use? By the way I cant use Date from ruby. class Month attr_reader :month, :year def initialize( month, year) @month...

ODOO, calendar.event : bool have no attribute replace

python-2.7,calendar,odoo,odoo-8
I extends class calendar_event for add status with statusbar. It's work perfectly when i update an event BUT when i tried to create i've a problem : Traceback (most recent call last): File "/home/x/workspace/Odoo8/openerp/http.py", line 530, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/x/workspace/Odoo8/openerp/http.py", line 567, in dispatch result = self._call_function(**self.params)...

Simple output Chinese calendar JAVA | Find an animal + color/type from input

java,math,calendar,switch-statement,puzzle
We have an input year (1987, 2015 etc) and Chinese calendar. 12 animals are changing every year. 5 colors are changing every 2 year. So the cycle is 60 years between Green Monkey and Green Monkey. First year of that cycle is 1984 (so it's Green Monkey year). I've got...

How to set day of the month by default to 25

java,calendar
I need your help in setting the default value of the day of the month to 25. In the method, I am getting the previous seven months from today's date, however I need to get the previous seven months from today's date bu the day should be by default as...

Matt Kruse's JavaScript Calendar - today's date / other months dates

javascript,calendar
I have a question regarding the very nice (but non updated Calendar) from Matt Kruse on this Page: http://www.mattkruse.com/javascript/calendarpopup/ (many samples and the codes are all there - here you find a simple example: http://www.mattkruse.com/javascript/calendarpopup/simple.html) The Calender works very well (iam using the "Lightbox / DIV-style display"), but it is...

Improper date conversion?

ios,swift,calendar
I'm trying to create a function that will get the Gregorian start and end dates for a month passed in of any arbitrary calendar. So if I pass Hebrew calendar, month 3, year 5775, I would expect back something like this (2015-05-19T00:00:00.000-05:00, 2015-06-17T00:00:00.000-05:00) let (start,end) = gregorianMonthForCalendarMonth(NSCalendar(calendarIdentifier: NSCalendarIdentifierHebrew)!, 3, 5775)...

How to use Calendar.getInstance with specified Locale

java,calendar
I am trying to use Calendar.getInstance(Locale l) with specified Locale and is not working. I cannot figure out what I am doing wrong. The Java Doc. say: getInstance public static Calendar getInstance(Locale aLocale) Gets a calendar using the default time zone and specified locale. The Calendar returned is based on...

How to make event trigger at the same time on all devices regardless of timezone

java,android,calendar,timezone
If my application triggers an event at 9pm EST, It should also trigger this event at 6pm PST. Currently I am parsing a feed and this feed says that the event will run at 9 pm EST. Without altering the feed, what is the best way to make my code...

How do i delete the JLabel from previous creation?

java,swing,calendar
I'm creating a calendar, and i use forloop to loop the days and add JLabel according to each day. However, whenever I change the month of the calendar, let say January has 31 days , and If I change the month to February for example, February will have 31 +...

php calendar: adding days of week from previous month to first week

php,calendar
I have a calendar that I made with php. It looks like this: The image above is of the month March. It looks fine, but when I choose August it looks like this: (the two numbers in each box are: top one: day. bottom one: another number that i put...

How to prevent my application to get cached value of TimeZone.getDefault()?

android,calendar,timezone
I am using TimeZone.getDefault() to set the timezone of Calendar class: Calendar cal = Calendar.getInstance(TimeZone.getDefault()); Log.i("TEST", cal.get(Calendar.HOUR) + ":" + cal.get(Calendar.MINUTE)); However, when users change the timezone of their device from Setting, my application represents the time using the former timezone until they force stop (from App info settings) the...

How to show previous 6 months up to today's date in primefaces calendar

java,primefaces,calendar
I need your help in applying the below requirement in the primefaces calendar that I can allow the user to select any date range from the calendar component starting from the previous 6 months from today's date until today's date. To clear the question, the calendar component should allow the...

Find the last Friday of previous month and check how many days in between current date

java,date,calendar
I need to find the Last Friday of the previous month. This month is June. I need the last Friday of May. In this case (May 29th). I am able to only find the Last Friday of current month. After I find the previous month's Friday, I need to check...

Fast way to get the current Calendar object in Java

java,time,calendar
Given a method that needs to use the values of the current day/month/year on every invocation and which is invoked several (millions or more) times per second, is there any faster way of implementing that functionality, other than creating a Calendar object for the current time on every invocation? Using...

Calendar class time month not matching

java,calendar
Calendar c = Calendar.getInstance(); System.out.println("Mili->>" + c.getTimeInMillis()); System.out.println("Month ->>" + Calendar.MONTH); Though I am getting correct time in millisec format, Month is showing as 2 (March??) Why so? Below is output Mili->>1434029840778 Month ->>2 ...

iOS - programatically rejecting permission to contacts (after user has accepted)

ios,events,permissions,calendar,contacts
Is there a way to programatically reject/disable/disallow/reject permissions to access the calendar? I'm using the following code to ask for / determine permissions: //request access [[MyCalendarUtil sharedManager] requestAccess:^(BOOL granted, NSError *error) { /* This code will run when uses has made his/her choice */ if(error) { // display error message...

java difference between calendars

java,android,calendar,simpledateformat,difference
I'm just doing a simple difference of two timemilisseconds of two different calendar. Example: Calendar ini = Calendar.getInstance(); try { Thread.sleep(1500); } catch (InterruptedException e) {e.printStackTrace();} Calendar end = Calendar.getInstance(); long diff = end.getTimeInMillis()-ini.getTimeInMillis(); System.out.println("diff "+diff); System.out.println("ini date "+ ini.getTime()); System.out.println("end date "+ end.getTime()); System.out.println("diff time format "+timeFormat.format(diff)); The time...

Show text if date is today

php,date,calendar,show
I need to show (today) text if date is today. How do I do that! I tried everything but cant find the right anwser that's why Im asking here. Here is the piece of codeI have right now. $mod_list.= '<ul class="upcoming-events"><li> <div class="date"> <span><span class="day">'.date($dateformat,$datetime_start).'</span> <span><span class="month">'.date($datemonth,$datetime_start).'</span> <span><span class="year">'.date($dateyear,$datetime_start).'</span> </div>';...

Removing all the eventSources in fullCalendar

javascript,calendar,fullcalendar
I have two types of events in my fullCalendar. Few are the fetched from the eventSources using : $('calendar').fullCalendar('addEventSource' , 'source') And few are created by the user. I am using $('calendar').fullCalendar('renderEvent', eventData, true) Now upon clicking a button I want to remove all the events that are obtained from...

Linking two calendars using VB.NET

vb.net,calendar
I have a question. I have 2 calendars on an aspx. I want to keep them synchronized. What I want is that when I switch on Calendar1 to a month, Calendar2 should go to the same month. WHen I open my page they are both on the current month. When...

Calendar with DatePicker always returns last month even if I add + 1

java,android,datepicker,calendar
I was trying to get Year-Month-Day from Calendar object, I know month start from index of 0. So I added +1 to month object. But still it gives me the last month from selection through date picker. Where I am going wrong? This is how I am trying. This is...

How the iOS built-in Calendar app sync with various calendar sources?

ios,calendar,google-calendar,caldav
I am trying to make a calendar app like sunrise and iOS Calendar app. How does iOS Calendar app syncing with various calendar sources like Google, Exchange and iCloud etc? What protocol does they use? Caldav? If I am going to make a app like that? How should I do...

Calendar#get(Calendar.HOUR_OF_DAY) vs TimeUnits.MILLISECONDS.toHours()

java,android,calendar
Do you guys know why this happens, why Calendar returns 1 for hours while it is definitely not 1, but 0.008 in this concrete case: millisUntilFinished = 30 * 1000 public void test(long millisUntilFinished) { final Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(millisUntilFinished); Timber.i("Hours: " + cal.get(Calendar.HOUR_OF_DAY)); Timber.i("Hours using TimeUnit: " +...

Android get Day of week from date returns different values for the same day of week

java,android,date,calendar
Here is my code that convert string ("12/05/2015") from textView into date with the same format, and i want to get from that date its day of week. String d1=((TextView)findViewById(R.id.tvDate2)).getText().toString(); SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); Date convertedDate = new Date(); try { convertedDate = dateFormat.parse(d1); } catch (ParseException e) {...

font and color change not applying only to datepicker

javascript,css,angularjs,calendar,bootstrap-datetimepicker
I have created an application for getting a calendar using angularjs, I have used angular-bootstrap-datetimepicker plugin for achieving that. The application is working fine but the issue is that I want he font size of the calendar to be font-size: 105% when I applied the below style it is applying...

DateTime vs. NSDate - What is more suitable for a calendar implementation?

c#,ios,calendar,monotouch,xamarin
I want to include a small calendar implementation in my app. In general, you have two possibilities to implement this: Either working with DateTime or with NSDate (NSCalendar, NSDateComponents). This is an essential design decision. What I've found out is that not all methods can be translated one to one...

How to feed a Google Calendar?

api,calendar,google-calendar,feed
I am using this sample to feed my calendar. I have created a Client ID but after I run this project I get 2 errors in console as is shown: Code: <html> <head> <script type="text/javascript"> // Your Client ID can be retrieved from your project in the Google // Developer...

How to add checkboxes to each day in this calendar view?

c#,asp.net-mvc,asp.net-mvc-3,asp.net-mvc-4,calendar
I am trying to add a simple checkbox feature to each day in my calendar view. It must be inline with the style of the current calendar and when a bool is selected it must be able to save the changes to the database. Any suggestions would be appreciated. My...

How to get a specific date format using momentjs?

javascript,date,calendar,momentjs
I want to display the date clicked on in a specific format with localised strings, but although it shows the locale being set, the string I get is this: Fri Jun 05 2015 00:00:00 GMT+0300 (EEST) I would like to turn that into Friday, 5. June 2015 with localised words....

getting the event from variable

javascript,jquery,calendar
i m studing the jquery calendar from github: https://github.com/themouette/jquery-week-calendar I pull the data from database by using code behind C#, and stored it at hiddenfield, then javascript read the hiddenfield field value as string. i will skip how i get the value from database, in this question, i hardcode the...

There is an error in a PHP calendar [closed]

php,calendar
I have a very simple script for a PHP calendar but when i try it there is a string that i don't write. Then appear "nnnnnnnnnnnnnnnnnn" but there isn't anything like echo "nnnnnnnnnnnnnn" so i don't know what is the error. Please help me. CODE: <?php $monthNames = Array("Gennaio", "Febbraio",...

Python - Calendar Experts - Whether My Algorithm And Logics Correct Or Not?

python,calendar,jodatime
I did some research and wrote a program in Python to show Hijri(Islamic calendar) Date in this format... weekday_name, date, month, year I want to use this within one of my Apps. Just wanted to know whether my codes are correct or not. I am no way near of a...

Android convert milliseconds to hours

java,android,time,calendar,parseint
I have milliseconds in String and i want to get hour and minutes from it. This is my code: String ms = "1425652847915"; int t = Integer.parseInt(ms); Calendar c = Calendar.getInstance(); c.set(Calendar.MILLISECOND, t); int h = c.get(Calendar.HOUR_OF_DAY); int m = c.get(Calendar.MINUTE); But i got this error: java.lang.NumberFormatException: unable to parse...

Generating dates to the days of a week in Python?

python,date,calendar
I need to generate a date of Monday of a week from a date (example: 2015/10/22). And generate the dates for the next days: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. Example in Java: (initial date = 2015/10/22) // Monday: date.set (Calendar.DAY_OF_WEEK, Calendar.MONDAY); // Add the next day (Tuesday) date.add...

Algorithm to find the Gregorian date of the Chinese New Year of a certain Gregorian year

c#,algorithm,date,calendar,gregorian-calendar
I am making a driver to calculate various holidays in a given time span. So, I need to find the Gregorian dates of all the Chinese Holidays (Chinese New Year, QingMing Festival, Dragon Boat Festival, etc). I used the famous 'Easter algorithm' for Good Friday, Easter Monday, Ascension Day, and...

Why in order to compare hijri with iso dates you need to wrap a DateTime in LocalDateTime? (Joda)

java,datetime,calendar,jodatime,gregorian-calendar
I am trying to convert an ISO (Gregorian) date into a hijri (Islamic) date and the compare the first to a hijri date. What I do and it does not work is: Chronology iso = ISOChronology.getInstanceUTC(); Chronology hijri = IslamicChronology.getInstanceUTC(); DateTime dtISO = new DateTime("2015-03-12T10:04:43", iso); System.out.println("dtISO: " + dtISO);...

GetUserAvailabilityResults shows result outside working hours in Exchange web service

c#,calendar,ews,exchange-server-2010,meeting
GetUserAvailabilityResults shows result which are outside working hours in Exchange web service although I have set MaximumNonWorkHoursSuggestionsPerDay = 0 Also, I want to know how to get and set the working hours. Moreover, results.AttendeesAvailability returns null private static void GetSuggestedMeetingTimes(ExchangeService service) { // Create a list of attendees. List<AttendeeInfo> attendees...

Using Calendar to reset counted steps every midnight

java,android,calendar
I am building an android app where it counts user's steps. The purpose is to count steps from midnight of the previous day to midnight of the each day. This is how I set up my Calendar object. It is a Java question really. Calendar cal = Calendar.getInstance(); Date now...

Add time to 9-hours days

java,date,calendar
I'm working on a basic project that manages tasks. Working days are from 8:00 to 17:00. A task has a start time and an estimated duration. This estimated duration is in minutes. I want to calculate the end time. I've figured out how to add days to the start time...

I cannot set the AM_PM variable in Java 8 Micro Edition

calendar,java-me
I'm a teaching myself Java and am a beginner. As part of a larger project I am running code to determine, and then later set, the time on a Calendar object. I have scoured the internet for a way to set the AM_PM value but I cannot get it to...

Swift - Start day and end day of the week before previous week

swift,calendar
Today is Friday 6 March. How to find that 16 Feb is the start day and 22 Feb is the end day of the week before previous week. 16 is for my country Bulgaria in USA will be 15 and 21 I use .currentCalendar()

Javascript Conflict in Magento

javascript,jquery,magento,calendar
I am using this extension on my magento store . Extension :http://www.magentocommerce.com/magento-connect/event-calendar-1.html This is the event page on my store : www.alshulauae.com/events But the custom javascript for this theme http://alshulauae.com/skin/frontend/default/MAG090176/js/custom.js is conflict with the extension and the event calendar is not showing . If I remove the custom.js , the...

Comparing calendar objects

java,calendar,compare
I'm having some trouble with comparing 2 calendar objects. Here's my code: String date = "06/19/2015"; Calendar c = Calendar.getInstance(); String days="", months="", years=""; Scanner sc = new Scanner(date); sc.useDelimiter("/"); while(sc.hasNext()){ months = sc.next(); days = sc.next(); years = sc.next(); } int day = Integer.parseInt(days); int month = Integer.parseInt(months); int...

Difference between LG default calendar and Google calendars

android,calendar,google-calendar,android-calendar,lg
On my LG-G3 there is a default calendar named "Phone". It's not Google's. I build an application which syncs events with the user's Google Calendars, but when I select all the calendars with a query - I get the "Phone" calendar too. Since it's not a Google calendar, I can't...

Calendar App: How to sync moved items?

ios,ruby-on-rails,core-data,calendar,sync
I am trying to build a calendar app with same set of syncing feature of Google Calendar and Sunrise app How to tackle moved events or deleted events ? For example: For a month API call I received 100 event ids and I stored it locally. Next time I should...

How to get the order of each day in a week?

ios,calendar,weekday
I wonder if there is a way to know how each day of a week ordered? I know in the Gregorian calendar, property 'weekday' indicates 1-7, and Sunday is represented by 1. But when I change the region(setting->General->Language &Region->Region) to Russia, the Apple's calendar app displays 'M'as the first day...

How can I make the days of the month be printed according to each day (ex: Su Mo Tu We…etc)?

ruby,calendar
I have a big String with numbers 1-31. and how would i be able to center the name of the month? My code: class Month attr_reader :month, :year def initialize( month, year) @month = month @year = year end def month_names names_of_months = {1 => 'January', 2 => 'February', 3...

Convert string Persian date to datetime for convert to miladi date

c#,datetime,calendar
Convert string Persian date to datetime for convert to miladi date i user date time picker and it send me string like "۱۳۹۴/۰۲/۲۰" PersianCalendar p = new PersianCalendar(); string[] d = start.Split('/'); DateTime dt = new DateTime(int.Parse(d[0]), int.Parse(d[1]), int.Parse(d[2]), new HijriCalendar()); and my function that convert is public static DateTime...

fullCalendarjs method fullCalendar('clientEvents') returns duplicate events

javascript,jquery,calendar,fullcalendar
I am using fullcalendar.io I dynamically populate my calendar, by adding events via evenSources. Such as: $('.add-more-events').on('click', function(){ var myEventSourceUrl = // ... get the event source url somehow var eventSourceColor = // ... get the color for this source var eventSource = { type: 'GET', url: myEventSourceUrl, color: eventSourceColor...

Get events from Controller to Full calendar via json and ajax

javascript,jquery,ajax,json,calendar
I am working on a calendar module and I can't get events to be loaded to full calendar from the controller. Here's my code. here's the controller class: public JsonResult PublicHolidayList() { List<Event> events = new List<Event>(); events.Add(new Event() { EventName = "EventName 1", StartDate = DateTime.Now.ToString("MM-dd-yyyy"), EndDate = DateTime.Now.AddDays(2).ToString("MM-dd-yyyy")...

How do I attatch text information to a specific date using Calender View

android,android-intent,android-activity,calendar
I added the calender view to my black activity. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".Homepage"> <CalendarView...

how to show calendar (days in week-mode) in android?

android,calendar
i want to design a calendar like this image in my app. also i want to change months with swiping on it. what should i do? Thanks

Xcode 7 beta – differences in NSDateComponents?

xcode,swift,calendar,swift2
I have been working on a clock app in Swift and with Xcode 6.3.2 the following code builds and runs just fine. // Get current time let date = NSDate() let calendar = NSCalendar.currentCalendar() let components = calendar.components(.CalendarUnitHour | .CalendarUnitMinute | .CalendarUnitSecond | .CalendarUnitNanosecond, fromDate: date) let hour = components.hour...

Adding calendar in ms access and view the data of specific day by clicking the date

database,ms-access,calendar,ms-access-2010
I'm working on MS Access, using Northwind DB. I'm trying to to add a calendar in a form and link it with the dbo_orders table. such that i can retrieve how many orders made on particular day by clicking on the date in calendar. Ex. Consider the dbo_Orders in Northwind...

Obtaining value from Calendar control without selecting a day

c#,wpf,calendar,wpf-controls
Is there a way (using a Calendar control in Visual Studio WPF) I can obtain a value without actually selecting a day within the control. For example, I have a client that wants the calendar's DisplayMode = Year. And now let's say they select the month of March within the...

How do I get the monthName to display?

java,calendar
Here is my code: public class CalendarDisplay { public static boolean isLeapYear(int year) { return (year %400 == 0) || (year %4 == 0 && year %100 != 0); } public static void main(String[] args) { int year = Integer.parseInt(args[0]); int month = Integer.parseInt(args [1]); boolean leapYear = isLeapYear(year); System.out.println("The...

Rails Full calendar can not shown

javascript,ruby-on-rails,indexing,calendar
I am trying to implement Example but I am having troubles at the beginning. I can not see the calendar on the page. However, when I download the code from the web page and make arrangements it works. So what I did is to create a demo folder (rails new...

Android pass long value to class View

android,class,view,calendar,long-integer
I'm using the library WeekView When the application starts, I want to pass to class View the date from calendar for set the first day of view. In the Activity, I set the calendar, and pass it to class: calendarioFooter.add(Calendar.DATE,1); mWeekView = (WeekView) rootView.findViewById(R.id.weekView); mWeekView.setOnEventClickListener(this); mWeekView.setEmptyViewClickListener(this); mWeekView.setMonthChangeListener(this); mWeekView.setEventLongPressListener(this); mWeekView.setDataRicevuta(calendarioFooter.getTimeInMillis()); In...

Calculating days between two dates wrong output

java,date,calendar
There are a lot of replicate questions on this matter, I've looked through most of them and got to make my code, but it didn't work. SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); Calendar date1 = Calendar.getInstance(); Calendar date2 = Calendar.getInstance(); String targetDate = "18/05/2015"; date2.setTime(formatter.parse(targetDate)); long diff = date2.getTimeInMillis() - date1.getTimeInMillis();...

IOS/xcode/coredata: Implement calendar control using core data

ios,core-data,calendar,control,eventkit
IOS newb here trying to implement an open source calendar control MADay in my project with the data stored in core data. The calendar control does not provide documentation for accessing core data. I am guessing that I need to create an NSArray after pulling the events from core data...

Calendar User inputting dates?

java,date,calendar
I would like to add user input as in they enter the dates so I can do calculations on it later. Instead of setting the date like I did below I am at a loss of how this is done if anyone could help or point me in the right...

How to get the example of MSCollectionViewCalendarLayout working

ios,calendar,cocoapods
I downloaded the MSCollectionViewCalendarLayout and now I wanted to try out the example. If I open the Example.xcodeproj I only get errors e.g. Lexical or Preprocessor Issue 'RestKit/RestKit.h' file not found I tried the tip from the troubleshooting guide to change the project settings but it didn't worked. If I...

Adding a birthday to the Google Birthday calendar who isn't a contact

google-chrome,calendar
Say I want to add my dogs birthday, or my grandson, who's 2, do I have to add my dog as a contact and enter in her birthday. I don't want to have the Google Birthday calendar and a self made birthday calendar. When you create an event the Google...

How can i get `String` date from calendar?

java,string,calendar
How can i get String date from calendar? Calendar cal = Calendar.getInstance(); cal.add(Calendar.DAY_OF_MOUNTH, -5); //set now and 5 days to back I want get String like this(date on interval -5 days to TODAY): 11.03.2015 10.03.2015 . . . 07.03.2015 It's possible? How?...