A period of time is an interval, a span of time.
Questions tagged [period]
444 questions
65
votes
3 answers
Using a variable period in an interval in Postgres
I have a relation that maintains monthly historical data. This data is added to the table on the last day of each month. A service I am writing can then be called specifying a month and a number of months prior for which to retrieve the historical…
![](../../users/profiles/999537.webp)
Belizzle
- 1,121
- 3
- 11
- 26
57
votes
4 answers
Period to string
I'm using the Joda-Time library with Java. I'm having some difficulty trying to turn a Period object to a string in the format of "x days, x hours, x minutes".
These Period objects are first created by adding an amount of seconds to them (they are…
tt
53
votes
5 answers
Generate a list of datetimes between an interval
Given two datetimes (start_date and end_date), I'd like to generate a list of other datetimes between these two dates, the new datetimes being separated by a variable interval. e.g. every 4 days between 2011-10-10 and 2011-12-12 or every 8 hours…
![](../../users/profiles/1026660.webp)
Joucks
- 1,222
- 1
- 17
- 29
41
votes
3 answers
What does 'PT' prefix stand for in Duration?
I am trying to use the Duration class instead of long.
It has superior literal syntax. I like its flexibility, though it looks weird.
"PT10S" means 10 seconds, what is the problem to accept "10 seconds"?!
Okay never mind.
I am just curious why PT…
![](../../users/profiles/342882.webp)
Daneel Yaitskov
- 4,019
- 6
- 34
- 40
40
votes
4 answers
Run a function periodically in Scala
I want to call an arbitrary function every n seconds. Basically I want something identical to SetInterval from Javascript. How can I achieve this in Scala?
![](../../users/profiles/179746.webp)
src091
- 2,479
- 5
- 35
- 68
29
votes
2 answers
Fast Fourier Transform in R
I have a dataset with the number of hourly visits an animal made during a period of 12 months. I want to use the Fast Fourier Transform to examine cyclical patterns and periodicity. In the past, I have used Statistica for this this; however, I would…
![](../../users/profiles/1626688.webp)
user1626688
- 1,331
- 4
- 16
- 25
21
votes
4 answers
How to format a Period in Java 8 / jsr310?
I'd like to format a Period using a pattern like YY years, MM months, DD days. The utilities in Java 8 are designed to format time but neither period, nor duration. There's a PeriodFormatter in Joda time. Does Java have similar utilities?
![](../../users/profiles/1429387.webp)
naXa
- 26,677
- 15
- 154
- 213
15
votes
3 answers
How to handle full period in java.time?
The Period class in java.time handles only the date-oriented potion: years, months, days.
What about the time portion: hours, minutes, seconds?
How can we parse and generate string representations of full periods as defined in ISO 8601,…
![](../../users/profiles/642706.webp)
Basil Bourque
- 218,480
- 72
- 657
- 915
14
votes
2 answers
ASP.NET MVC: How to Route Search Term with . (Period) at the end
I get a 404 response from .Net MVC when I try to make a request where my search term ends with a . (period). This is the route that I'm using:
routes.MapRoute(
"Json",
"Remote.mvc/{action}/{searchTerm}/{count}",
…
Will
14
votes
1 answer
What is the meaning of ". filename" (period space filename) in Bash?
What does a command with format [period][space][filename] mean?
Example:
. ./setup.sh
Also in the .bashrc file, we have a line like that:
. "$HOME/.bashrc"
What does this mean?
![](../../users/profiles/2446466.webp)
Muhammad Raihan Muhaimin
- 4,923
- 7
- 39
- 61
12
votes
6 answers
Working with an array with periods in key values
I'm getting data from an array. For some reason the array has key values like [3.3] which I'm having trouble retrieving data from.
I have this array [3.3] => First Name [3.6] => Last Name[2] => email@example.com.
When I try to call $array[3.3] it…
![](../../users/profiles/172964.webp)
Brooke.
- 3,411
- 13
- 46
- 79
11
votes
2 answers
Java - Elegant way of parsing date/period?
From the ISO-8601 standards, there are 4 ways of expressing intervals/duration:
Start and end, such as "2007-03-01T13:00:00Z/2008-05-11T15:30:00Z"
Start and duration, such as "2007-03-01T13:00:00Z/P1Y2M10DT2H30M"
Duration and end, such as…
![](../../users/profiles/7147702.webp)
aphrid
- 519
- 7
- 24
11
votes
3 answers
Any way to convert a JodaTime Period to a decimal number of hours?
I have a JodaTime Period that I've created from two DateTime instants. Is there a good way to convert that Period into a decimal number of hours?
For instance, I have a Period that goes from 1pm to 1:30pm on Jan 1, 2010. How can I get that Period…
![](../../users/profiles/171696.webp)
jbarz
- 572
- 6
- 17
10
votes
3 answers
What does the 'period' character (.) mean if used in the middle of a php string?
I'm fairly new to PHP, but I can't seem to find the solution to this question in google.
Here is some example code:
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' .…
![](../../users/profiles/387169.webp)
mhz
- 969
- 2
- 7
- 27
9
votes
1 answer
Perl period vs comma operator
Why does
print "$str is " , ispalindrome($str) ? "" : " not" , " a palindrome\n"
print "madam is a palindrome", but
print "$str is " . ispalindrome($str) ? "" : " not" . " a palindrome\n"
prints ""?
user959408