Where dateformat module is located and where I can find it's api docs?
I see there is a package in npm with name dateformat, but on my machine dateformat module is already installed. I'm unable to find it in nodejs official docs.
A'm I missing a whole branch of available modules in nodejs?
Looking forward for some explanation.
Option #1 - Date() Documentation
Well Node.js JavaScript, so you can just use the Date() documentation.
Option #2 - Additional Functionality
However the functions included within the Date API, is limited, which is why, as you mentioned, you may want to use an external library. A common, and very stable well supported choice would be moment.js
Related
With regard to my previous question on how to manage timezone specific date as well as manage their conversions, I have been trying to think of a way to be able to get updated timezone information that reflects the latest possible data of the iana tz db.
Since I'm using nodejs, my options was to use a library that dealt with timezones.
I found the following type of libraries, and I have queries related to each one:
That use the Intl api, and maintain/package no timezone information
themselves(libraries include date-fns-tz, day.js):
First page of date-fns-tz says:
Time zone support for date-fns v2.0.0 using the Intl API. By using the browser API no time zone data needs to be included in code bundles. Modern browsers and Node.js all support the necessary features, and for those that don't a
As far as I can see, they dependent on nodejs itself managing the timezone data, which in turn depends on the ICU library, which doesn't seem to be updated quite often even though nodejs version itself gets updated. Question a., is this a correct deduction, or do they query some external servers(user's system/remote etc)?
Libraries that rollout their own compilation of tzdb (moment-timezone):
They seem to update quite periodically, but, in the particular case of moment-timezone, it seems to be an addon for moment, but, they both seem to be legacy project, and the homepage itself suggests not using it.
The best option for me would be the option number 2. But, as you can see above, I'd like to avoid using a legacy project. So, my Question b. would be for a suggestion for a method to get the most updated timezone information for use in nodejs(possibly another library suggestion or something else)
So, my Question b. would be for a suggestion for a method to get the most updated timezone information for use in nodejs(possibly another library suggestion or something else)
I personally used moment for years but when it was classified as a legacy project, I switched to dayjs with the timezone plugin. Hope it helps
Day.js supports time zone via the Internationalization API in supported environments. By using the native API, no extra bytes of timezone data need to be included in code bundle.
The list of all time zone names can be fount in the IANA database.
I'm trying to follow the simple guide on adding versioning to my API in NestJS. But the app instance does not seem to have the enableVersioning(). There also doesn't seem to be any VersionType enum exported by any Nest package.
I'd love to be able to add versioning.
enableVersioning was added in #nestjs/common#8 and #nestjs/core#8. The docs are current for Nest v8, for v7 you can view the docs here. Make sure you're using the latest version to have access to all of the features in the docs.
I am interested in playing around with the Q & A service, the demo app uses the REST API and I am wondering if the service can be used with the newer watson-developer-cloud module and if so where can I find an example or documentation for those functions.
The demo is online at Q&A Node.js demo but this uses the older REST API.
Thanks,
Andy
Yes, you should be able to use the service with the newer watson-developer-cloud module, but there's no updated demo. Note, that the module was not changed drastically enough that it should really matter.
The README.md file for the Github repository containing the project has a full set of usage instructions.
Turns out that Stripe module at Parse Could Code is out of date and won't be updated.
Source:
https://developers.facebook.com/bugs/523104684492016/
Parse modules are using an old version of the API and there is no plan
to update it in the near future.
As a workaround please download the newer SDKs directly off the third
party site, place it in "cloud/" folder and import it using require();
We're going to close this by design.
I have downloaded Stripe module via terminal with command
npm install stripe
I'm trying to import this module but when I deploy it to Parse, it seems that most of the modules are missing. I get errors like this:
Update failed with Error: Module child_process.js not found
at node_modules/stripe/lib/stripe.js:24:12
Hope someone can point me out on how to add third party modules to Parse Cloud Code properly. Thanks.
Seems that Parse's module support is really limited and adding submodules is impossible or too complex to even bother, that's why I decided to move to Heroku. Thanks for all answers!
I know that this is a bit old, but my "workaround" was, rather than importing the module, convert the cURL requests from Stripe's documentation to Parse.Cloud.httpRequests. You can get access to the entire API that way.
I have just imported a NodeJS project into Eclipse with VJET plugin. It seems nice that it understands some of the NodeJS but I don't like that it doesn't recognize Node-MySQL. Is there any documentation on how to write a project (like NodejsTL) to fill up that missing functionality? I could analyze NodejsTL one but if there is any documentation and tutorial - I wouldn't have to.
Yes there is some documentation on this topic of creating type libraries.
http://www.ebayopensource.org/wiki/display/VJET/VJET+Type+lib+Tutorial+-+part+1
There is some work being proposed to help with this and we are currently looking for help to extend VJET to do this work. Here are the tickets related to this request.
https://www.ebayopensource.org/jira/browse/VJET-87
https://www.ebayopensource.org/jira/browse/VJET-88