jodatime Questions
5
Solved
Is it possible to parse a date and extract the week of month using Joda-Time. I know it is possible to do it for the week of year but I cannot find how/if it is possible to extract the week of mont...
4
Solved
I need to know whether the period defined by:
DateTime start;
DateTime end;
has a DST inside.
I am iterating over collection of periods defined by {start,end} and shifting start and end 24 hour...
4
Solved
I got the file from the Joda site and followed these instructions for adding libraries but when I get to the Gradle sync I end up with the error:
Gradle Sync
Error:Configuration with name 'defau...
3
Solved
In Joda-Time 2, what is the difference between the three kinds of time spans:
Period
Interval
Duration
Why do we need three classes?
Which one performs better?
Why is dividing a Period or Dur...
3
Solved
With the following app:
; src/webapp/core.clj
(ns webapp.core
(:require [compojure.core :refer [defroutes GET]]
[ring.middleware.json :as mid-json]
[clj-time.jdbc]))
(defn foo [request]
{:bod...
7
Getting the following exception when using the AWS SDK for Java and Java 1.8u60+.
com.amazonaws.services.s3.model.AmazonS3Exception: AWS authentication requires a valid Date or x-amz-date header (...
Chaste asked 17/8, 2015 at 19:43
7
How can I convert a java.util.Date to String using
DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss")
The Date object which I get is passed
DateTime now ...
Naresh asked 13/2, 2017 at 17:46
3
Solved
I have movie with duration 127 seconds. I wanna display it as 02:07. What is the best way to implement this?
3
Solved
I have an instance of Instant (org.joda.time.Instant) which I get in some api response. I have another instance from (java.time.Instant) which I get from some other call. Now, I want to compare the...
Gumption asked 22/7, 2016 at 17:36
5
Solved
I'd like to use Joda's DateTime for query parameters in Jersey, but this isn't supported by Jersey out-of-the-box. I'm assuming that implementing an InjectableProvider is the proper way to add Date...
7
Solved
I want to create an interval between the beginning of the week, and the end of the current week.
I have the following code, borrowed from this answer:
private LocalDateTime calcNextSunday(LocalDate...
9
Solved
6
Solved
For instance:
Calendar c = Calendar.getInstance();
DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
c.setTime( sdf.parse("31/12/2010"));
out.println( c.get( Calendar.WEEK_OF_YEAR ) );
Print...
Overstuff asked 5/1, 2011 at 19:43
3
Solved
I am trying to calculate the minutes between two Joda DateTimes or Calendars in Java.
Ofcourse this would be simple if I could use the Minutes.minutesBetween function, but I can only count the minu...
10
How do I get Jackson to serialize my Joda DateTime object according to a simple pattern (like "dd-MM-yyyy")?
I've tried:
@JsonSerialize(using=DateTimeSerializer.class)
private final DateTime date...
4
Solved
I am looking for a Java library that handles conversion to/from GPS Time.
GPS Time has an epoch of 6 January 1980, and does not have leap seconds, so it differs from the more standard time represen...
4
Solved
I am seeing a a couple of errors coming up on Crittercism (Crash reporting service) for my published Android app. The trace is the following:
0 java.io.IOException: Resource not found: "org/joda/t...
Braden asked 24/5, 2012 at 18:29
4
Solved
I am trying to serialize/deserialize a date from/to a JavaScript application.
Server side, I use Java, JodaTime is installed on it. I found out how to serialize to ISO with UTC Time zone, but can'...
Radioman asked 19/9, 2014 at 16:35
2
Solved
The API for parseLocalDate says it will throw UnsupportedOperationException "if parsing is not supported". What does it mean by 'if parsing is not supported'? I'm looking through the source and can...
19
Solved
Im working in a project and I got two types in Date. I want to calculate the number of weeks between these two dates. The dates can be in diffrent years. Is there any good solution for this?
I ha...
4
Solved
I am using transformation to new timezone UTC+3 which is equal to EAT timezone, but Postgres (9.1) shows the wrong time
select '2015-01-13 08:40:00.0'::timestamp with time zone AT TIME ZONE 'UTC+0...
Caisson asked 14/1, 2015 at 8:48
4
Solved
How can I use the @Value annotation to configure a Joda-Time Period field in my spring bean?
E.g. Given the following component class:
@Component
public class MyService {
@Value("${myapp.period...
Punak asked 30/11, 2015 at 17:20
9
Solved
How do I find the difference in Days between two Joda-Time DateTime instances?
With ‘difference in days’ I mean if start is on Monday and end is on Tuesday I expect a return value of 1 regardless o...
8
Solved
How do you determine which day of the week is considered the “start” according to a given Locale using Joda-Time?
Point: Most countries use the international standard Monday as first day of week (!...
8
Solved
Anyone know of a Java library that can parse time strings such as "30min" or "2h 15min" or "2d 15h 30min" as milliseconds (or some kind of Duration object). Can Joda-Time do something like this?
(...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.