Questions tagged [days]

A day is a unit of time which is equal to an interval of 24 hours. It may be used for example for measuring the length of a period (see also period tag). For questions about dates or day of week rather consider tags like date or dayofweek.

554 questions
4
votes
2 answers

Full calendar events are not spanning across multiple days

I have been working on a web application that requires a calendar that will display events along with information about them. I have been using the full calendar API to handle the calendar for me. But I whenever I have an event that spans across…
Ben
  • 41
  • 4
4
votes
5 answers

Get Date of Previous Monday

I'm trying to get the date of the monday in the current week. Is this close to correct? Dim MondayOfCurrentWeek As Date = Date.Today - Date.Today.DayOfWeek + 1 As far as I understand it the AyOfWeek indexes are: 1 = Monday 2 = Tuesday 3 =…
user1283776
  • 19,640
  • 49
  • 136
  • 276
4
votes
2 answers

Calling a method when a new day is detected

I want my application to detect when it is a new day upon startup. If it is a new day I want it to start a new activity and repeat the cycle. for the Next Day. I start with a calendar instance getting the day of year. Calendar c =…
The Tokenizer
  • 1,564
  • 3
  • 29
  • 46
4
votes
2 answers

Javascript Days calculation between two days

var oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds var firstDate = new Date(2013, 06, 30); var secondDate = new Date(2013, 07, 01); var diffDays = Math.round(Math.abs((secondDate.getTime() - firstDate.getTime()) / (oneDay))); I…
4
votes
4 answers

C#: DateTime - Going through a period of days?

I have a period of days and I want to go through it and execute the same code on each date. begin and end are DateTime format with difference of a month at least while ( !(begin.Equals(end)) ) { ...some code here... …
Ms. Nobody
  • 1,219
  • 3
  • 14
  • 34
4
votes
1 answer

Fullcalendar onclick show dayview

Im new to Javascript stuff especially on JSON and Jquery. I have successfully implement the monthly view of FullCalendar but is there anyway to show or pop up the dayview based on the date when user clicked on monthly view? Any help would be much…
scholarwithfire
  • 345
  • 2
  • 8
  • 21
4
votes
2 answers

How to calculate the date after x days in C

I'm programming a microcontroller in C that has an internal RTC and automatically increments a day counter (0-65536). So, given the initial date adjusted by the user (DD/MM/YYYY), I need to keep the calendar updated based on that counter. That is, I…
Daniel Santos
  • 41
  • 1
  • 2
3
votes
2 answers

Date to Day conversion in Java

I am able to convert date to days using the below code. SimpleDateFormat sfd = new SimpleDateFormat("yyyy-MM-dd"); String s1 = sfd.format(dateObj); String a1 [] = s1.split("-"); int year = Integer.parseInt(a1[0].toString()); int month =…
GKD
  • 53
  • 1
  • 1
  • 7
3
votes
2 answers

How to count number of days for every month in a date range

I have data as below +-----+------------+-------------+ | TYPE|DTIN_DATE |DTOUT_DATE | +-----+------------+-------------+ | A| 2021-03-22| 2021-05-26| | B| 2021-03-30| 2021-04-09| +-----+------------+-------------+ I want to expand…
3
votes
5 answers

How can I find the number of days between two Dates?

I have two Dates. How can I tell the difference between these two dates in days? I have heard of SimpleDateFormat, but I don't know how to use it. I tried this: String fromdate = "Apr 10 2011"; SimpleDateFormat sdf; sdf = new SimpleDateFormat("MMM…
Pavan
  • 93
  • 5
  • 9
3
votes
1 answer

Adding days to named parameter of type Date in HQL

I've got an oracle database in which warehouses are stored that are open only on one given day in a week, e.g. 'monday' or 'thursday'. The day the warehouse is open is stored as an integer. Sunday is stored as 0, saturday as 6. Each warehouse is…
3
votes
2 answers

For each day, subtract last time row from the first time row with Python

I have 5 minutes-interval meteorological df for many days. Some rows and days are missing. Index is datetime format. DateTime Data 2016-01-01 07:00:00 1 2016-01-01 10:30:00 2 2016-01-01 16:55:00 3 2016-03-25 09:25:00 …
k.ko3n
  • 954
  • 8
  • 26
3
votes
1 answer

moment.js returns next day

I'm parsing a date like this. The locale of moment is set to Germany: moment("2030-12-31T23:59:59.000Z") However when I print it it will select the next day: moment("2030-12-31T23:59:59.000Z").format('L') -> "01.01.2031" This is what the moment…
Matthias Max
  • 595
  • 1
  • 7
  • 20
3
votes
3 answers

DateInterval total number of days as float

For now I don't care about timezones and just want to have a correct calculated value of how many days are between two dates. I think I'm pretty near to what I want, but for me there is always a full day missing. That's what I got so far: $start =…
simplychrislike
  • 436
  • 4
  • 9
3
votes
5 answers

php - issue in increase days-date

im try to increase days(60) in m-d-Y but it is calculate wrong day. it is consider it as d-m-y format. echo "Today is :: ".date("m-d-Y"); echo "\n"; echo $DateEnd = date('m-d-Y', strtotime(date("m-d-Y") . ' +60 day')); output is :: Today is…
JON
  • 965
  • 2
  • 10
  • 28
1 2
3
36 37