Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLyBird 48 hour restriction on old db file

 
Didier Varon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

On the URLyBird assignment there is a restriction about booking time:
"They take bookings only within 48 hours of the start of room occupancy"

But when I am reading the db file I have found that all records are for previous years (2003 to 2005), so any query returns an empty set, because I am using the machine's date to validate against the records' date to enforce this requirement.

I am wondering if I am using a right criterion for that validation or if I should download the application again.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They mean (I think, I'd have to have the entire paragraph to be sure) that you can only book a room for an arrival date that's no more than 48 hours later than the booking date.

So if today is 28/04/2006 you cannot accept a booking for a date later than 30/04/2006 (and you may have to use the actual time of day as well, if that's stored in the database).

But as I don't do UrlyBird I can't be 100% certain, as I don't have the original text to check against.
 
B Chen
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the availability date is 4/28/2006, then you can book the room on 4/26 and 4/27. You cannot book the room on any other date, past or future.
When I did the assignment, I wrote a small program that changed the date on some records so I can test.
 
Didier Varon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks B Chen,

I think I understand now =)
 
Ken Boyd
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can change your PC date close to 48 hours to match records in db. Even my URLBird has dates of 2005 and need to change PC clock to test 48 hours rule. Even if you download assignment again you will get same files.
 
Didier Varon
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank's Ken,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic