Questions about Mathematica's date and time functions.

learn more… | top users | synonyms (1)

9
votes
1answer
225 views

How do I determine astronomical transit times?

Mathematica, through the "legacy" Scientific Astronomer package, used to have the ability to easily determine accurate transit times of astronomical objects simply, with ...
19
votes
3answers
871 views

How can I make a heatmap of a days in year?

I know Mathematica has a ListPlot for time series but does it have a function for visualizing a list of dates as a heat map like this: This idea is from D3, check it out here.
11
votes
3answers
479 views

Simpler way to fill date gaps with zero values

One basic problem when working with data like sales and dates is the case where you dont't have sales in all days, so you have to fill it to take information as average or to make a plot. See this toy ...
10
votes
2answers
383 views

MovingAverage[] and Fit[] with data containing DateLists

I have data which has the following appearance: data = {{DateList, Real}, ..., {DateList, Real}} It's easy to visualize the data by using ...
6
votes
3answers
203 views

Importing and manipulating strings - time data

I have a list of time durations, which are strings of the form: "hh:mm:ss". Here's a sample for you to play with: ...
11
votes
2answers
792 views

How do I compute sidereal time and JD?

There was once a package that provided a wide range of functions for computing astronomical information. This package now appears to be out of date; but as near as I can tell, many of the useful ...
6
votes
2answers
168 views

DateList Segmentation of data

I've been trying to separate large segments of DateList formatted data (years worth at a time) into individual days using the Split function. The data has the form: ...
4
votes
1answer
432 views

Simple countdown timer in Mathematica

I dug around a bit and did not find a simple and clear implementation of countdown stopwatch in Mathematica. I am looking for a function that takes as an input a certain integer and then counts down ...
1
vote
1answer
206 views

How can Time be made to go backwards?

I would like to make a countdown timer, but cannot find a reliable method to make the DateList[] function reverse. The not so robust code for the Digital Clock with the display of seconds follows: ...
10
votes
7answers
200 views

DateList coupled with String Operations

Through some webscraping, I have the following list: ...
7
votes
2answers
131 views

DatePlus and DateList are inconsistent with numerical handling of the final element

If you run this code you will see that DatePlus and DateList are inconsistent in the format of the lowest order element of the ...
9
votes
1answer
108 views

DateList not using current year when a year is not specified

According to the documentation when using DateList but not giving it a year it should use the current year. It is not doing that for me. Instead it uses 1900. ...
5
votes
3answers
162 views

DateList's aggressive interpretation of TimeML duration codes

DateList "aggressively" interprets strings, such as "p72h": DateList["p72h"] gives ...
9
votes
1answer
274 views

How can I get the frame ticks from DateListPlot?

DateListPlot very nicely chooses major and minor frame tick and frame tick label/markers. I am building a custom graphics function where either the ...
5
votes
2answers
334 views

From a list of dates get a list of the last date available in a each month

I wondered if anyone has another or even a more direct way of finding the last dates of each month available from a list of successive dates? I currently do the following (note: nothing special about ...
8
votes
3answers
280 views

Faster Alternatives to DateDifference

I need a faster implementation of FractionOfYear and FractionOfMonth, which do the following: Input: A time/date specified by ...
23
votes
6answers
958 views

Faster alternatives for DayOfWeek

It has been noticed on several occasions that DayOfWeek function is rather slow when applied to a large list of dates, e.g. in this recent question. What faster ...
6
votes
3answers
238 views

Determining the dates of days

I'm trying to use WeatherData[] to give me (not sure how) the temperature, humidity, wind-speed, cloud cover... at a certain location. I only want the information ...
9
votes
1answer
184 views

How can I convert the dates returned by FinancialData into decimal representation?

I'm trying to run a regression using Fit on the output of FinancialData["SPY", "Jan. 1, 2011"]. However, the dates returned ...
16
votes
9answers
1k views

Determining the week of a year from a given date

Consider the following: AbsoluteTime["17/04/2012",{"Day","/","Month","Year"}]; From my calendar in my office, I know that April 17th is in the 16th week of the ...
8
votes
1answer
207 views

Day of the week vs time on BoxWhiskerChart

I am completely stuck on how to approach this problem: I'm basically trying to figure out when is the best time to tweet on twitter, based on a list of timestamps: Here are the raw values: ...
10
votes
1answer
422 views

How to import date (YYYY-MM-DD) data from a file?

I have a file with data in form {date, value}: 2010-05-19 17 2010-05-20 20 ...