Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Anyone bored and want to make a method for me?

  1. #1
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Anyone bored and want to make a method for me?

    I've got a handful of stuff I'm doing right now. Very low on that list is a method that I will eventually need to make. If you feel like giving it a shot, I would appreciate it. There is no money or anything that I can give for the help (sorry), but if you feel like, take a shot at it.

    Method Details:
    Takes in two Dates
    Returns an array of all the Dates between the two Dates (inclusively)

    It is pretty straight forward, and I'm sure most people on the forum could do it. When I will have to get around to it, I will have to do some research on Date and that sort of crap before I can make the method since I've never used it before. If you have experience with the Date class (or any other classes that would be better for this) and if you feel like giving me a hand, it is appreciated.

    Cheers
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Anyone bored and want to make a method for me?

    Nvm, I got it done.

    In case anyone needs it:
    	public List<Date> getDates(Date d1,Date d2)
        {
        	List<Date> dates = new ArrayList<Date>();
    		long interval = 1000 * 60 * 60 * 24;
    		long endTime = d2.getTime();
    		long curTime = d1.getTime();
    		while (curTime <= endTime) {
    		  dates.add(new Date(curTime));
    		  curTime += interval;
    		}
    		return dates;
        }
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. Help, Want to make a BASIC min value Method with Generics
    By Iglesias in forum Collections and Generics
    Replies: 6
    Last Post: September 12th, 2010, 10:16 PM
  2. How to make a graph like this
    By sugarhigh in forum AWT / Java Swing
    Replies: 1
    Last Post: August 27th, 2010, 09:05 AM
  3. Trying to make a bot
    By ighor10 in forum Java Theory & Questions
    Replies: 1
    Last Post: June 11th, 2010, 02:07 PM
  4. make forum with EJB??!!
    By element_sole in forum Enterprise JavaBeans
    Replies: 3
    Last Post: February 12th, 2010, 02:18 PM
  5. How to make it???
    By Subhasis Banerjee in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: October 29th, 2009, 02:49 PM