FileDocCategorySizeDatePackage
DateHelper.javaAPI Docmp4parser 1.0-RC-171349Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.authoring

DateHelper

public class DateHelper extends Object
Converts ISO Dates (seconds since 1/1/1904) to Date and vice versa.

Fields Summary
Constructors Summary
Methods Summary
public static java.util.Dateconvert(long secondsSince)
Converts a long value with seconds since 1/1/1904 to Date.

param
secondsSince seconds since 1/1/1904
return
date the corresponding Date

        return new Date((secondsSince - 2082844800L) * 1000L);
    
public static longconvert(java.util.Date date)
Converts a date as long to a mac date as long

param
date date to convert
return
date in mac format

        return (date.getTime() / 1000L) + 2082844800L;