1

I am using moment.js and what i see is that as user selects a date we get moment as an object where we have _d and also a prototype along wit it . Here is how it looks .

d: Tue Jan 01 2019 11:35:00 GMT+0530 (India Standard Time)
__proto__:
constructor: ƒ Date()
getDate: ƒ getDate()
getDay: ƒ getDay()
getFullYear: ƒ getFullYear()
getHours: ƒ getHours()
getMilliseconds: ƒ getMilliseconds()
getMinutes: ƒ getMinutes()
getMonth: ƒ getMonth()
getSeconds: ƒ getSeconds()
getTime: ƒ getTime()
getTimezoneOffset: ƒ getTimezoneOffset()
getUTCDate: ƒ getUTCDate()
getUTCDay: ƒ getUTCDay()
getUTCFullYear: ƒ getUTCFullYear()
getUTCHou

I need to send only the Tue Jan 01 2019 11:35:00 GMT+0530 (India Standard Time) part in the url while calling to api .How do we achieve this ?My concern is how to get rid of everything else .

  • You can pass object values by dot method lets assume date object something like object.d – sagar patel Jan 08 '19 at 06:23
  • Possible duplicate of [Moment.js transform to date object](https://stackoverflow.com/questions/17987647/moment-js-transform-to-date-object) – VincenzoC Jan 08 '19 at 06:30

0 Answers0