Declare js variables and remove seconds