DateTime objects in many programming languages describe an instant in time, expressed as a date and time of day.

learn more… | top users | synonyms

6
votes
1answer
70 views

Bucketizing time (e.g., 4 min => 0-5 min)

Specification: Given a string (e.g., the content of an article), print the estimated reading time by bucketizing time into increasingly large chunks in the form "5-10 min" or "48 min-2 hr". ...
1
vote
1answer
120 views

Sort by a custom date field

I've got this code to work, but being really new to PHP, I don't know if this is proper. I've sorted a CPT loop by a custom date. I'm displaying items from most recent (or future date) to oldest if ...
5
votes
0answers
53 views

Expressing Rebol Dates in BNF

I'm looking to define the Rebol date format in BNF notation (as adapted for Rebol Parse). I'd like as best as possible to only define valid dates—at least those that are valid in Rebol at the moment: ...
4
votes
0answers
57 views

Datepickers for departure and return dates

I have to two datepickers. I want achieve a following functionality: when return date cannot be selected before departure and departure cannot be after return date. Mainly I am interested in ...
3
votes
0answers
61 views

Calculate compilation time from AssemblyVersion attribute

In my program, I display the compilation time which is calculated from the AssemblyVersion attribute. The attribute is set to automatically generate a version ...
3
votes
0answers
422 views

Implementing “day wise task management” system using Django and AngularJS

I have a Task model in Django which looks like the following: ...
2
votes
0answers
50 views

An implementation of `ago()` in PHP

Here is my code for the string ago(int timestamp) function: Bitbucket snippet ...
2
votes
0answers
218 views

Map Events From calendar provider to dates in gridview

I working on a calendar app on Android, using roomaorama, which is nice. I am fetching all the events from Events table in Calendar provider once which seems not good performance wise. The library ...
2
votes
0answers
33 views

Complete date ranges for two years

I have array contents with some date ranges, fetched from the database: ...
1
vote
0answers
44 views
1
vote
0answers
49 views

Updating datetime fields from UTC to local time zone

I have created an SQL query to update datetime fields from UTC to local time zone. Can someone review this? ...
1
vote
0answers
79 views

Calendar application with shaky Logic

I have built a calendar application just with jQuery. The script file is on Github. The code works perfectly fine and I have tested it. Please feel free to clone and test as well. I am uncertain on ...
1
vote
0answers
23 views

Time calculation to identify current phase

I have a program that works by periodic phases, and I need to understand, depending on the current time, which phase should be executed. The following is not for busy wait, it's just a check. I'm ...
1
vote
0answers
248 views

Handling hours, minutes, seconds

Basically I wanted to make a generic class for parsing time codes and dealing with small units of time. I have tried to keep it very simple (small API) and 0 dependency (apart from RSpec). Some ...
1
vote
0answers
1k views

Approximating Date for a D3.js timeline

I've updated code from a couple weeks back so I've come back to get more feedback. The original post can be found over here: Approximating/Sorting groups of dates into buckets ...
1
vote
0answers
145 views

Date/Time picker for browsers that don't support the datetimelocal input

Any tips on optimizing this code? ...
0
votes
0answers
30 views

Dynamic/Global Business Days Calculation

I have a problem in that I need a formula which calculates business days around the world. For example, in the UK we have 5 day weeks, but in the Middle East they have 6 day weeks. Also, perhaps we ...
0
votes
0answers
49 views

Live update calendar

I've made a calendar using a Firebase database so that it live updates. I'm pretty happy with it but I feel like restructuring it to fit the MVC design pattern, however, I've never done anything in ...