Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for SimpleDateFormat (1.07 sec)

  1. src/test/java/org/codelibs/core/convert/TimeConversionUtilTest.java

            final SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
            df.setTimeZone(TimeZone.getTimeZone("JST"));
            assertThat(df.format(date), is("11:49:10"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToDate_PlainFormat() throws Exception {
            final Date date = toDate("114910");
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/convert/TimestampConversionUtilTest.java

            assertThat(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date), is("2010/09/07 11:49:00"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testToDate_MediumStyle() throws Exception {
            final Date date = toDate("2010/9/7 11:49:10", Locale.JAPAN);
            assertThat(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(date), is("2010/09/07 11:49:10"));
        }
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/convert/DateConversionUtilTest.java

         * @throws Exception
         */
        @Test
        public void testToDate_ShortStyle() throws Exception {
            System.out.println(((SimpleDateFormat) DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL)).toPattern());
            final Date date = toDate("10/9/7");
            assertThat(new SimpleDateFormat("yyyy/MM/dd").format(date), is("2010/09/07"));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. maven-api-impl/src/main/java/org/apache/maven/internal/impl/model/MavenBuildTimestamp.java

            if (timestampFormat == null) {
                timestampFormat = DEFAULT_BUILD_TIMESTAMP_FORMAT;
            }
            if (time == null) {
                time = Instant.now();
            }
            SimpleDateFormat dateFormat = new SimpleDateFormat(timestampFormat);
            dateFormat.setCalendar(new GregorianCalendar());
            dateFormat.setTimeZone(DEFAULT_BUILD_TIME_ZONE);
            formattedTimestamp = dateFormat.format(new Date(time.toEpochMilli()));
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Fri Apr 12 10:50:18 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  5. maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java

            if (timestampFormat == null) {
                timestampFormat = DEFAULT_BUILD_TIMESTAMP_FORMAT;
            }
            if (time == null) {
                time = new Date();
            }
            SimpleDateFormat dateFormat = new SimpleDateFormat(timestampFormat);
            dateFormat.setCalendar(new GregorianCalendar());
            dateFormat.setTimeZone(DEFAULT_BUILD_TIME_ZONE);
            formattedTimestamp = dateFormat.format(time);
        }
    
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Tue Nov 22 13:26:01 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/convert/DateConversionUtil.java

                if (format instanceof SimpleDateFormat) {
                    final SimpleDateFormat simpleFormat = (SimpleDateFormat) format;
                    final String pattern = toPlainPattern(simpleFormat.toPattern());
                    if (pattern.length() == src.length()) {
                        return new SimpleDateFormat(pattern);
                    }
                }
                return null;
            }
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  7. maven-resolver-provider/src/test/java/org/apache/maven/repository/internal/RemoteSnapshotMetadataTest.java

            Locale.setDefault(new Locale("th", "TH"));
        }
    
        @AfterEach
        void restoreLocale() {
            Locale.setDefault(defaultLocale);
        }
    
        static String gregorianDate() {
            SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
            df.setCalendar(new GregorianCalendar());
            df.setTimeZone(RemoteSnapshotMetadata.DEFAULT_SNAPSHOT_TIME_ZONE);
            return df.format(new Date());
        }
    
        @Test
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Fri Feb 16 11:43:34 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/convert/LongConversionUtil.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.convert;
    
    import java.text.SimpleDateFormat;
    
    import org.codelibs.core.lang.StringUtil;
    import org.codelibs.core.text.DecimalFormatUtil;
    
    /**
     * {@link Long}用の変換ユーティリティです。
     *
     * @author higa
     */
    public abstract class LongConversionUtil {
    
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/core/convert/FloatConversionUtil.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.convert;
    
    import java.text.SimpleDateFormat;
    
    import org.codelibs.core.lang.StringUtil;
    import org.codelibs.core.text.DecimalFormatUtil;
    
    /**
     * {@link Float}用の変換ユーティリティです。
     *
     * @author higa
     */
    public abstract class FloatConversionUtil {
    
    Registered: Wed Jun 12 12:50:12 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  10. maven-compat/src/main/java/org/apache/maven/project/interpolation/BuildTimestampValueSource.java

     * KIND, either express or implied.  See the License for the
     * specific language governing permissions and limitations
     * under the License.
     */
    package org.apache.maven.project.interpolation;
    
    import java.text.SimpleDateFormat;
    import java.util.Date;
    
    import org.codehaus.plexus.interpolation.AbstractValueSource;
    
    /**
     *
     */
    @Deprecated
    public class BuildTimestampValueSource extends AbstractValueSource {
    
    Registered: Wed Jun 12 09:55:16 UTC 2024
    - Last Modified: Mon Dec 26 15:12:32 UTC 2022
    - 1.7K bytes
    - Viewed (0)
Back to top