Here you can find the source of getFormattedMillisolString(double s)
public static String getFormattedMillisolString(double s)
//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 }