Azure-docs: JS example for `delay` is wrong

Created on 4 Feb 2019  Â·  5Comments  Â·  Source: MicrosoftDocs/azure-docs

In the example, there is

const dayOfMonth = context.df.currentUtcDateTime.getDate();

However this is wrong because in version 1.7.1 of durable functions extension, currentUtcDateTime is a string and does not have the getDate() method.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 assigned-to-author azure-functionsvc doc-bug triaged

All 5 comments

@cliffkoh
Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

See related issue at https://github.com/Azure/azure-functions-durable-js/issues/45 which includes screenshot where this property is a string and not a Date object.

Unless I'm missing something, isn't this line redundant anyway? dayOfMonth isn't used anywhere.

Thanks @jameshowe. Removed the line from the sample, should be live in 24 hours.

The type of currentUtcDateTime has been fixed in https://github.com/Azure/azure-functions-durable-js/pull/88. It's now a date.

Was this page helpful?
0 / 5 - 0 ratings