We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is an example. "2014-03-10 19:00" actually parses as 2014-03-09 19:00.
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; import org.junit.Test; import com.mdimension.jchronic.Chronic; import com.mdimension.jchronic.Options; import com.mdimension.jchronic.tags.Pointer; import com.mdimension.jchronic.utils.Span; public class PenDownloadTest { @Test public void testJchronicPast() { TimeZone zone = TimeZone.getTimeZone("America/Los_Angeles"); assertTrue(zone.observesDaylightTime()); Locale locale = Locale.US; Calendar now = Calendar.getInstance(zone, locale); now.clear(); now.set(2014, Calendar.MARCH, 13, 0, 0, 0); Options options = new Options(Pointer.PointerType.PAST, now, false, 6); Calendar expectedTime = Calendar.getInstance(zone, locale); expectedTime.clear(); expectedTime.set(2014, Calendar.MARCH, 10, 19, 0); Span expectedSpan = new Span(expectedTime, Calendar.SECOND, 1); Span actualSpan = Chronic.parse("2014-03-10 19:00", options); assertEquals(expectedSpan, actualSpan); } }
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out. A pull request would be awesome :) I can't say that I have time to track this down at the moment.
Sorry, something went wrong.
No branches or pull requests
Here is an example. "2014-03-10 19:00" actually parses as 2014-03-09 19:00.
The text was updated successfully, but these errors were encountered: