Tabnine Logo
OrgRange.getStartTime
Code IndexAdd Tabnine to your IDE (free)

How to use
getStartTime
method
in
com.orgzly.org.datetime.OrgRange

Best Java code snippets using com.orgzly.org.datetime.OrgRange.getStartTime (Showing top 9 results out of 315)

origin: orgzly/org-java

@Test
public void testJeuWeekDay() {
  OrgRange time = OrgRange.parse("[2011-08-18 jeu. 19:12]");
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNull(time.getEndTime());
  Assert.assertEquals(2011, time.getStartTime().getCalendar().get(Calendar.YEAR));
  Assert.assertEquals(7, time.getStartTime().getCalendar().get(Calendar.MONTH));
  Assert.assertEquals(18, time.getStartTime().getCalendar().get(Calendar.DATE));
  Assert.assertEquals(19, time.getStartTime().getCalendar().get(Calendar.HOUR_OF_DAY));
  Assert.assertEquals(12, time.getStartTime().getCalendar().get(Calendar.MINUTE));
}
origin: orgzly/org-java

@Test
public void testInvalidDateTimeWithNoSpacing() {
  OrgRange time = OrgRange.parse("[2011-08-1819:12]");
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNull(time.getEndTime());
  Assert.assertEquals(2011, time.getStartTime().getCalendar().get(Calendar.YEAR));
  Assert.assertEquals(7, time.getStartTime().getCalendar().get(Calendar.MONTH));
  Assert.assertEquals(18, time.getStartTime().getCalendar().get(Calendar.DATE));
}
origin: orgzly/org-java

@Test
public void testEndTimes() {
  OrgRange time = OrgRange.parse("<2015-01-13 уто 13:00-14:14>--<2015-01-14 сре 14:10-15:20>");
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNotNull(time.getEndTime());
  Assert.assertEquals(14, time.getStartTime().getEndCalendar().get(Calendar.HOUR_OF_DAY));
  Assert.assertEquals(14, time.getStartTime().getEndCalendar().get(Calendar.MINUTE));
  Assert.assertEquals(15, time.getEndTime().getEndCalendar().get(Calendar.HOUR_OF_DAY));
  Assert.assertEquals(20, time.getEndTime().getEndCalendar().get(Calendar.MINUTE));
}
origin: orgzly/org-java

@Test
public void testFromString2() {
  OrgRange time = OrgRange.parse("[2000-01-01 00:12 .+1h]--<2000-02-02 Mon +1d>");
  Assert.assertNotNull(time);
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNotNull(time.getEndTime());
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNotNull(time.getEndTime());
  Assert.assertEquals("[2000-01-01 00:12 .+1h]", time.getStartTime().toString());
  Assert.assertFalse(time.getStartTime().isActive());
  Assert.assertEquals(2000, time.getStartTime().getCalendar().get(Calendar.YEAR));
  Assert.assertEquals(0, time.getStartTime().getCalendar().get(Calendar.MONTH));
  Assert.assertEquals(1, time.getStartTime().getCalendar().get(Calendar.DATE));
  Assert.assertEquals(0, time.getStartTime().getCalendar().get(Calendar.HOUR_OF_DAY));
  Assert.assertEquals(12, time.getStartTime().getCalendar().get(Calendar.MINUTE));
  Assert.assertEquals("<2000-02-02 Mon +1d>", time.getEndTime().toString());
  Assert.assertTrue(time.getEndTime().isActive());
}
origin: orgzly/org-java

@Test
public void testRangeWithOneDash() {
  OrgRange time = OrgRange.parse("[2000-01-01 00:12 .+1h]-<2000-02-02 Mon +1d>");
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNotNull(time.getEndTime());
}
origin: orgzly/org-java

@Test
public void testRangeWith3Dashes() {
  OrgRange time = OrgRange.parse("[2000-01-01 00:12 .+1h]---<2000-02-02 Mon +1d>");
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNotNull(time.getEndTime());
}
origin: orgzly/org-java

@Test
public void testRangeWithRepeaterAndHabitDeadline() {
  OrgRange time = OrgRange.parse("<2015-01-11 Sun .+1d/2d>");
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNull(time.getEndTime());
}
origin: orgzly/org-java

@Test
public void testFromString1() {
  OrgRange time = OrgRange.parse("[2000-01-01]--<2000-02-02 10:20>");
  Assert.assertNotNull(time);
  Assert.assertNotNull(time.getStartTime());
  Assert.assertNotNull(time.getEndTime());
  Assert.assertEquals("[2000-01-01]", time.getStartTime().toString());
  Assert.assertFalse(time.getStartTime().isActive());
  Assert.assertEquals("<2000-02-02 10:20>", time.getEndTime().toString());
  Assert.assertTrue(time.getEndTime().isActive());
  Assert.assertEquals("[2000-01-01]--<2000-02-02 10:20>", time.toString());
}
origin: orgzly/org-java

@Test
public void testComplicatedTimestamp() throws IOException {
  String fileContent =
      "** TODO Shave\n" +
      "SCHEDULED: <2009-10-17 Sat .+2d/4d>\n" +
      "   - State \"DONE\"       from \"TODO\"       [2009-10-15 Thu]\n" +
      "   - State \"DONE\"       from \"TODO\"       [2009-10-12 Mon]\n" +
      "   :PROPERTIES:\n" +
      "   :STYLE:    habit\n" +
      "   :LAST_REPEAT: [2009-10-19 Mon 00:36]\n" +
      "   :END:";
  OrgParsedFile file = parserBuilder.setInput(fileContent).build().parse();
  Assert.assertEquals("", file.getFile().getPreface());
  Assert.assertEquals("Shave", file.getHeadsInList().get(0).getHead().getTitle());
  Assert.assertEquals("<2009-10-17 Sat .+2d/4d>", file.getHeadsInList().get(0).getHead().getScheduled().getStartTime().toString());
  Assert.assertEquals("** TODO Shave\n" +
            "SCHEDULED: <2009-10-17 Sat .+2d/4d>\n" +
            "   - State \"DONE\"       from \"TODO\"       [2009-10-15 Thu]\n" +
            "   - State \"DONE\"       from \"TODO\"       [2009-10-12 Mon]\n" +
            "   :PROPERTIES:\n" +
            "   :STYLE:    habit\n" +
            "   :LAST_REPEAT: [2009-10-19 Mon 00:36]\n" +
            "   :END:\n\n", file.toString());
}
com.orgzly.org.datetimeOrgRangegetStartTime

Popular methods of OrgRange

  • <init>
  • parse
  • shift
    Shifts both timestamps by their repeater intervals.
  • doParse
  • getEndTime
  • isSet
  • toString
  • toStringWithoutBrackets

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • getContentResolver (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JList (javax.swing)
  • JPanel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now