When did Lady Gaga write Just Dance?

She never released the exact date but she did say "ONE DAY COMEING BACK FROM A CLUB AND SEEING HER FRIENDS DRUNK GAVE ME THE INSPERATION TO WRITE JUST DANCE" she also released a statement that stated "I WROTE JUST DANCE IN ONLY 10 MINS!"