Java Date Format ISO getFormattedMillisolString(double s)

Here you can find the source of getFormattedMillisolString(double s)

Description

get Formatted Millisol String

License

Open Source License

Declaration

public static String getFormattedMillisolString(double s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.text.DecimalFormat;

public class Main {
    public static final double SECONDS_PER_SOLAR_DAY_ON_MARS = 24 * 60 * 60 + 39 * 60 + 35.244;

    public static String getFormattedMillisolString(double s) {

        //      DecimalFormat fmt = new DecimalFormat("###.###");
        s = s * 3_600_000.0 / SECONDS_PER_SOLAR_DAY_ON_MARS;

        return new DecimalFormat("###.###").format(s);

    }//  w  w  w .j  a v a 2s  .c  o  m
}

Related

  1. formatWikiISO8601(Date d)
  2. fromIso8601(@Nullable String date)
  3. fromIso8601(String iso)
  4. get_ISO_8601()
  5. getDateAsISOString(Date date)
  6. getIso8601(final Date date)
  7. getISO8601Date(final Date date)
  8. getISO8601Date(long millis)
  9. getIso8601DateFormat()