Available Methods
- now ( )
- getMillis ( )
- toString ( )
- parse ( )
- withZone ( )
- getMonthOfYear ( )
- isBefore ( )
- getYear ( )
- isAfter ( )
- getHourOfDay ( )
- toDate ( )
- getDayOfMonth ( )
- minusDays ( )
- plusDays ( )
- getMinuteOfHour ( )
- getSecondOfMinute ( )
- plus ( )
- plusMinutes ( )
- getMillisOfSecond ( )
- minusMinutes ( )
- minus ( )
- isBeforeNow ( )
- plusHours ( )
- withTimeAtStartOfDay ( )
- plusMonths ( )
- getDayOfWeek ( )
- isEqual ( )
- dayOfMonth ( )
- plusYears ( )
- withDayOfWeek ( )
- isAfterNow ( )
- withChronology ( )
- minusMonths ( )
- plusSeconds ( )
- minusHours ( )
- withDayOfMonth ( )
- plusWeeks ( )
- equals ( )
- monthOfYear ( )
- dayOfYear ( )
- toCalendar ( )
- withMonthOfYear ( )
- toDateMidnight ( )
- withSecondOfMinute ( )
- minusYears ( )
- toYearMonthDay ( )
- toLocalDate ( )
- getDayOfYear ( )
- plusMillis ( )
- toLocalDateTime ( )
- compareTo ( )
- dayOfWeek ( )
- withZoneRetainFields ( )
- minusSeconds ( )
- toDateTime ( )
- Property ( )
- toInstant ( )
- withYear ( )
- getWeekOfWeekyear ( )
- get ( )
- toLocalTime ( )
- withDayOfYear ( )
- getWeekyear ( )
- minusMillis ( )
Related Classes
- java.util.Arrays
- java.io.File
- java.util.Collections
- android.content.Context
- java.util.Date
- java.util.Iterator
- java.util.concurrent.TimeUnit
- java.text.SimpleDateFormat
- java.util.Locale
- org.junit.Before
- java.util.UUID
- java.util.stream.Collectors
- java.util.Calendar
- java.util.Map.Entry
- org.junit.Assert
- java.util.Optional
- java.text.ParseException
- javax.servlet.http.HttpServletRequest
- java.math.BigDecimal
- javax.servlet.http.HttpServletResponse
- java.math.BigInteger
- java.util.stream.Stream
- org.apache.commons.lang3.StringUtils
- java.util.logging.Level
- com.google.common.collect.Lists
Java Code Examples for org.joda.time.DateTime#get()
The following examples show how to use
org.joda.time.DateTime#get() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbsoluteDateFormat.java From NaturalDateFormat with Apache License 2.0 | 6 votes |
@Override protected String formatDate(DateTime now, DateTime then) { if (dateFormat == null) buildDateFormat(); StringBuilder builder = new StringBuilder(); if (hasFormat(WEEKDAY) && now.get(omitWeekday) == then.get(omitWeekday)) builder.append(weekdayFormat.print(then)); if (hasFormat(DAYS | MONTHS)) { if (builder.length() > 0) builder.append(", "); builder.append(dateFormat.print(then)); } if (hasFormat(YEARS) && Years.yearsBetween(now, then).getYears() != 0) builder.append(yearFormat.print(then)); if (hasFormat(TIME) && now.get(omitTime) == then.get(omitTime)) { builder.append(", "); builder.append(formatTime(now, then)); } return builder.toString(); }
Example 2
Source File: QueryLog.java From unitime with Apache License 2.0 | 5 votes |
public String axe(DateTime now) { SimpleDateFormat format = new SimpleDateFormat(iAxeFormat, Localization.getJavaLocale()); DateTime dt = getFirst(now); int i = 0; StringBuffer ret = new StringBuffer(); while (dt != null) { if (i > 0) ret.append("|"); if ((dt.get(iAxeType) % iAxeMod) == iAxeValue) ret.append(format.format(dt.getMillis())); i++; dt = next(dt, now); } return ret.toString(); }