0

count days

asked 2014-12-29 02:57:36 +0800

jwasky gravatar image jwasky
11 3

updated 2014-12-29 09:08:24 +0800

hello, how to determine the date of the next 7 days in zkoss? help me please...

I asked about how to determine the date of payment if I want to start more than seven days after the date of this day for example: lending on Dec. 29, 2014 and then the payment should begin seven days after the date of the loan ?

i'm sorry, because my english conversation doesn't good, I do not speak English fluently

delete flag offensive retag edit

Comments

Can you explain a little more what you are looking? You are asking about zk calendar component or how to determine a date in java?

cyiannoulis ( 2014-12-29 07:51:16 +0800 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-12-29 09:34:50 +0800

cyiannoulis gravatar image cyiannoulis
1191 10

This is not a ZK topic. Just have a look here about date calculations in java.

Costas

link publish delete flag offensive edit
0

answered 2014-12-29 10:01:26 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

A nice library for calculating with date/time you can found here: joda time library

best Stephan

/**
     * Add count of days to a given date.
     * 
     * @param givenDate
     *            the given date..
     * @param daysToAdd
     *            the count of days to add.
     * @return Date
     */
    public static Date addDays(final Date givenDate, final Integer daysToAdd) {

        if (givenDate == null || daysToAdd == null) {
            throw new UiException("date or days to add should not be NULL!");
        }

        DateTime currDate = new DateTime(givenDate);
        DateTime newDate = currDate.plusDays(daysToAdd);

        return newDate.toDate();
    }
link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-12-29 02:57:36 +0800

Seen: 12 times

Last updated: Dec 29 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More