Shell program for beginners

Hey, i hope someone can help me with this program.

I need to write a program in shell which will return how many times and how much time have users been logged in system between two dates. We give time as 2 dates as arguments in command line.
Example:

$ nameofprogram 27/04 06/05

returns this:

user1 2x 0 days 2:46
user2 4x 0 days 11:42
user3 2x 0 days 1:58
user4 3x 1 day 18:41

As i find it really hard to programm in shell, i hope someone can help me with this. Thanks

This won't be a straight forward task as far as I know. First you need to capture the user log in a text file with time stamp.

I think who -u can be used to capture the info at regular intervals. But i'm not sure is there a way which automatically creates an entry in log.