I can't believe I missed it
code:
var PreviousToTimerPSM;
var mDate = new Date();
function OnEvent_Signout(Email) {
Messenger.MyPersonalMessage = PreviousToTimerPSM; //restores the original PSM while signing out?
}
function OnEvent_SigninReady(Email) {
PreviousToTimerPSM = Messenger.MyPersonalMessage; //retrieves the previous PSM once the user is signed in?
}
function OnEvent_MyStatusChange(NewStatus) {
if( NewStatus == 3 ) {
Messenger.MyPersonalMessage = PreviousToTimerPSM; //if it's online, no need to count.
} else if( NewStatus == 6 ) {
Messenger.MyPersonalMessage = "Estou ausente desde "+mDate.getHours()+":"+mDate.getMinutes();
} else if( NewStatus == 4 ) {
Messenger.MyPersonalMessage = "Estou ocupado desde "+mDate.getHours()+":"+mDate.getMinutes();
} else if( NewStatus == 5 ) {
Messenger.MyPersonalMessage = "Saí às "+mDate.getHours()+":"+mDate.getMinutes()+" mas volto logo!";
} else if( NewStatus == 7 ) {
Messenger.MyPersonalMessage = "Estou ausente desde "+mDate.getHours()+":"+mDate.getMinutes();
} else if( NewStatus == 8 ) {
Messenger.MyPersonalMessage = "Estou em uma ligação desde "+mDate.getHours()+":"+mDate.getMinutes();
} else if( NewStatus == 9 ) {
Messenger.MyPersonalMessage = "Estou almoçando desde "+mDate.getHours()+":"+mDate.getMinutes();
}
}
It is getHours() and getMinutes().