Code example for Time

Methods: formatset

    /** Read today's date and cache values. */ 
    public void updateDate() { 
        if (!DateUtil.isSameDate(mTempTime, mCachedDate)) {
            mCachedDateString = DateUtil.dateToString(mCachedDate);
            mUserDayOfWeekString = mCachedDate.format("%A");
            // NOTE: this value is cached for performance. If underlying system date order is changed,  
            // it will be reflected in next app restart. 
            mUserMonthDayString = mCachedDate
                    .format(dateOrder.monthBeforeDay() ? "%b %d" : "%d %b");
     * Return an unspecified time that is guaranteed to be today. Can change. Caller should not 
     * change. 
Experience pair programming with AI  Get Codota for Java