I'm new to Firebase and I was wondering how I can store a JavaScript date and use Firebase to compare them on the client side later?
I want to do something like:
var someDate = new Date();
myRootRef.set(someDate);
myRootRef.on('value', function(snapshot) {
var currDate = new Date();
if (currDate >= snapshot.val()){
//do something
}
However, I get back a value of null
from the snapshot?