Skip to content

Commit

Permalink
log start & end Dates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadam100 committed Jun 14, 2022
1 parent 7346a15 commit 6cc3e43
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions backend/controllers/attendance_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -790,11 +790,17 @@ module.exports.GetLastReport = (req, res) => {
if(req.body.StartDate) {
startDate = new Date(req.body.StartDate)
}
else {
startDate = new Date(new Date().setDate(1))
// else {
// startDate = new Date(new Date().setDate(1))
// }
if(req.body.EndDate) {
endDate = new Date(req.body.EndDate)
}
if(req.body.EndDate) endDate = new Date(req.body.EndDate)
else endDate = new Date(new Date().setDate(30))
// else {
// endDate = new Date(new Date().setDate(30))
// }
console.log("startDate ",startDate)
console.log("endDate ",endDate)
const reportagg = [
{
'$match': {
Expand Down

0 comments on commit 6cc3e43

Please sign in to comment.