Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.litesoft.core.typeutils;

import java.util.*;

import org.litesoft.core.simpletypes.temporal.*;
import org.litesoft.core.simpletypes.temporal.nonpublic.*;

public class Dates
{
    public static Date now()
    {
        return new Date();
    }

    public static SimpleDate forceEndOfMonth( SimpleDate pSimpleDate )
    {
        if ( pSimpleDate != null )
        {
            int zDaysInMonth = CalendarSupport.daysInMonth( pSimpleDate.getYear(), pSimpleDate.getMonth() );
            if ( pSimpleDate.getDay() != zDaysInMonth )
            {
                pSimpleDate.setDay( zDaysInMonth );
            }
        }
        return pSimpleDate;
    }
}

Commits for litesoft/trunk/Java/core/Anywhere/src/org/litesoft/core/typeutils/Dates.java

Diff revisions: vs.
Revision Author Commited Message
823 Diff Diff GeorgeS picture GeorgeS Sun 19 Aug, 2012 16:10:13 +0000
819 GeorgeS picture GeorgeS Sat 18 Aug, 2012 18:09:40 +0000