Все вопросы: [gregorian-calendar]
9 вопросов
Why does GregorianCalendar.getInstance contain a calsys and cdate of type Julian Calendar
I tried to do set date value to a PreparedStatement with default value but the value is sometimes returned as a JulianValue. For example (Assume spanBegin and spanEnd are null) Calendar cal = new GregorianCalendar(); if (spanBegin == null) { cal.set(0000, Calendar.JANUARY, 1); spanBegin ...
Last sunday of a year in c#
How can I get date of last sunday of a year in C#?? Will gregoriancalendar class be of help?
adding days to a date
I have a program that needs to start on 1/1/09 and when I start a new day, my program will show the next day. This is what I have so far: GregorianCalendar startDate = new GregorianCalendar(2009, Calendar.JANUARY, 1); SimpleDateFormat sdf = new SimpleDateFormat("d/M/yyyy"); public void setStart...
GregorianCalendar months
GregorianCalendar startDate = new GregorianCalendar(2009, Calendar.JANUARY, 1); SimpleDateFormat sdf = new SimpleDateFormat("d/m/yyyy"); public void setStart() { startDate.setLenient(false); System.out.println(sdf.format(startDate.getTime())); } When I run this code, I get 1/0/2009. I ...
GregorianCalendar constant date
Ok, I want to make my program print out the date: 1/1/2009 But this is what it prints out: Thu Jan 01 00:00:00 EST 2009 From this code GregorianCalendar startDate = new GregorianCalendar(2009, Calendar.JANUARY, 1); public void setStart() { startDate.setLenient(false); Date date = new...
GregorianCalendar
I am doing an assignment and it involves using the GregorianCalendar. The specs say I need to use setLenient(false); how do I do this? I also need to set a constant date (1/1/2009) so that the first day of my program is always that. It also says to access the day, month and year through this: g...
Creating a new NSCalendar calendar
I want to be able to convert between the Gregorian and Julian calendars (note: not "julian date") using NSCalendar on the iPhone. How can I subclass NSCalendar to use the Julian calendar? I want to do this without regards for 1582 or 1752 or any given year.
Календарь Java 1.5 # compareTo () путаница
Хорошо, я официально в тупике. У меня есть объект GregorianCalendar, который я хотел бы определить, находится ли он в прошлом, настоящем или будущем. Пока что Документы Calendar # compareTo меня сбивают с толку, поскольку я получаю ошибочные результаты. Простой тестовый класс проиллюстрирует м...
.NET дает мне неправильный номер недели 29 декабря 2008 г.?
Согласно официальный (грегорианский) календарь , номер недели на 29/12/2008 равен 1, потому что после последнего дня 52 недели (т.е. 28/12) в году осталось три или менее дней . Довольно странно, но ладно, правила есть правила. Итак, согласно этому календарю, у нас есть эти граничные значения...