Download dayofweek
Author: s | 2025-04-24
Download DayOfWeek Widget [NL] ดาวน์โหลด DayOfWeek Widget [TH] Descargar DayOfWeek Widget [ES] Scarica DayOfWeek Widget [IT] Pobierz DayOfWeek Widget [PL] DayOfWeek Widget for WordPress. Free. In English; V 2.10; 4 DayOfWeek_DAY_OF_WEEK_UNSPECIFIED DayOfWeek = 0 // Monday DayOfWeek_MONDAY DayOfWeek = 1 // Tuesday DayOfWeek_TUESDAY DayOfWeek = 2 // Wednesday DayOfWeek_WEDNESDAY DayOfWeek = 3 // Thursday DayOfWeek_THURSDAY DayOfWeek = 4 // Friday DayOfWeek_FRIDAY DayOfWeek = 5 About Download Blog Issue Tracker
DayOfWeek Widget for WordPress - Download
Null) { zipCode = 98052; } if (dayOfWeek === null) { dayOfWeek = "Wednesday"; } // Get weather report for specified zipCode and dayOfWeek. // ...}/** * Gets a weather report for a specified zipCode and dayOfWeek * @customfunction * @param zipCode Zip code. If omitted, zipCode = 98052. * @param [dayOfWeek] Day of the week. If omitted, dayOfWeek = Wednesday. * @returns Weather report for the day of the week in that zip code. */function getWeatherReport(zipCode?: number, dayOfWeek?: string): string { if (zipCode === null) { zipCode = 98052; } if (dayOfWeek === null) { dayOfWeek = "Wednesday"; } // Get weather report for specified zipCode and dayOfWeek. // ...}Range parametersYour custom function may accept a range of cell data as an input parameter. A function can also return a range of data. Excel will pass a range of cell data as a two-dimensional array.For example, suppose that your function returns the second highest value from a range of numbers stored in Excel. The following function accepts the parameter values, and the JSDOC syntax number[][] sets the parameter's dimensionality property to matrix in the JSON metadata for this function./** * Returns the second highest value in a matrixed range of values. * @customfunction * @param {number[][]} values Multiple ranges of values. */function secondHighest(values) { let highest = values[0][0], secondHighest = values[0][0]; for (let i = 0; i = highest) { secondHighest = highest; highest = values[i][j]; } else if (values[i][j] >= secondHighest) { secondHighest = values[i][j]; } } } return secondHighest;}Repeating parametersA repeating parameter allows a user to enter a series of optional arguments to a function. When the function is called, the values are provided in an array for the parameter. If the parameter name ends with a number, each argument's number will increase incrementally, such as ADD(number1, [number2], [number3],…). This matches the convention used for built-in Excel functions.The following function sums the total of numbers, cell addresses, as well as ranges, if entered./*** The sum of all of the numbers.* @customfunction* @param operands A number (such as 1 or 3.1415), a cell address (such as A1 or $E$11), or a range of cell addresses (such as B3:F12)*/function ADD(operands: number[][][]): number { let total: number = 0; operands.forEach(range => { range.forEach(row => { row.forEach(num => { total += num; }); }); }); return total;}This function shows =CONTOSO.ADD([operands], [operands]...) in the Excel workbook.Repeating single value parameterA repeating single value parameter allows multiple single values to be passed. For example, the user could enter ADD(1,B2,3). The following sample shows how to declare a single value parameter./** * @customfunction * @param {number[]} singleValue An array of numbers that are repeating parameters. */function addSingleValue(singleValue) { let total = 0; singleValue.forEach(value => { Skip to main content This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Custom functions parameter options Article07/05/2023 In this article -->Custom functions are configurable with many different parameter options.ImportantNote that Excel custom functions are available on the following platforms.Office on the webOffice on WindowsMicrosoft 365 subscriptionretail perpetual Office 2016 and latervolume-licensed perpetual Office 2021 and laterOffice on MacExcel custom functions aren't currently supported in the following:Office on iPadvolume-licensed perpetual versions of Office 2019 or earlier on WindowsNoteThe unified manifest for Microsoft 365 doesn't currently support custom functions projects. You must use the add-in only manifest for custom functions projects. For more information, see Office Add-ins manifest.Optional parametersWhen a user invokes a function in Excel, optional parameters appear in brackets. In the following sample, the add function can optionally add a third number. This function appears as =CONTOSO.ADD(first, second, [third]) in Excel.JavaScriptTypeScript/** * Calculates the sum of the specified numbers * @customfunction * @param {number} first First number. * @param {number} second Second number. * @param {number} [third] Third number to add. If omitted, third = 0. * @returns {number} The sum of the numbers. */function add(first, second, third) { if (third === null) { third = 0; } return first + second + third;}/** * Calculates the sum of the specified numbers * @customfunction * @param first First number. * @param second Second number. * @param [third] Third number to add. If omitted, third = 0. * @returns The sum of the numbers. */function add(first: number, second: number, third?: number): number { if (third === null) { third = 0; } return first + second + third;}NoteWhen no value is specified for an optional parameter, Excel assigns it the value null. This means default-initialized parameters in TypeScript will not work as expected. Don't use the syntax function add(first:number, second:number, third=0):number because it will not initialize third to 0. Instead use the TypeScript syntax as shown in the previous example.When you define a function that contains one or more optional parameters, specify what happens when the optional parameters are null. In the following example, zipCode and dayOfWeek are both optional parameters for the getWeatherReport function. If the zipCode parameter is null, the default value is set to 98052. If the dayOfWeek parameter is null, it's set to Wednesday.JavaScriptTypeScript/** * Gets a weather report for a specified zipCode and dayOfWeek * @customfunction * @param {number} [zipCode] Zip code. If omitted, zipCode = 98052. * @param {string} [dayOfWeek] Day of the week. If omitted, dayOfWeek = Wednesday. * @returns {string} Weather report for the day of the week in that zip code. */function getWeatherReport(zipCode, dayOfWeek) { if (zipCode ===Free download of the 'i-DayOfWeek' indicator by
I am using the Extract function to extract the day of the year.Lines 18 and 19: Extracting quarter and casting to a numeric/signed column.Lines 20 and 21: Extracting month number.Lines 22 and 23: Extracting week number.Lines 24 and 25: I decided having the day of week as a number in the View would could be useful. The week starts on Sunday so it is day number 1. I am casting this single digit number to numeric in the view.Line 26: Here is where I give the name of the dummy file.The rest of the code for the View looks like:27 LABEL ON COLUMN CL_DATE_NAMES (28 DAYOFWEEK IS 'Day of week',29 DAYOFMONTH IS 'Day of month',30 MONTHNAME IS 'Month name',31 YEAR IS 'Year',32 FULLDATE IS 'Full date',33 DAYOFYEAR IS 'Day of year',34 QUARTER IS 'Qtr of year',35 MONTHNBR IS 'Month',36 WEEK IS 'Week of year',37 DOWNBR IS 'Day of week as No.') ;38 LABEL ON COLUMN CL_DATE_NAMES (39 DAYOFWEEK TEXT IS 'Day of week',40 DAYOFMONTH TEXT IS 'Day of month',41 MONTHNAME TEXT IS 'Month name',42 YEAR TEXT IS 'Year',43 FULLDATE TEXT IS 'Full date',44 DAYOFYEAR TEXT IS 'Day of year',45 QUARTER TEXT IS 'Quarter of year',46 MONTHNBR TEXT IS 'Month',47 WEEK TEXT IS 'Week of year',48 DOWNBR TEXT IS 'Day of week as number') ;49 LABEL ON TABLE CL_DATE_NAMES IS 'CL_DATE_NAMES' ;Lines 27 – 37: Here I am giving all the columns their column descriptions/headings.Lines 38 – 48: And here the descriptions for the columns.Line 49: Lastly I am giving this. Download DayOfWeek Widget [NL] ดาวน์โหลด DayOfWeek Widget [TH] Descargar DayOfWeek Widget [ES] Scarica DayOfWeek Widget [IT] Pobierz DayOfWeek Widget [PL] DayOfWeek Widget for WordPress. Free. In English; V 2.10; 4 DayOfWeek_DAY_OF_WEEK_UNSPECIFIED DayOfWeek = 0 // Monday DayOfWeek_MONDAY DayOfWeek = 1 // Tuesday DayOfWeek_TUESDAY DayOfWeek = 2 // Wednesday DayOfWeek_WEDNESDAY DayOfWeek = 3 // Thursday DayOfWeek_THURSDAY DayOfWeek = 4 // Friday DayOfWeek_FRIDAY DayOfWeek = 5 About Download Blog Issue TrackerFree download of the 'DayOfWeek' indicator by 'Scriptor' for
Also referred to as A5 (SCL) and A4 (SDA).The following table lists the pin connections:The diagram below shows how to connect everything.Installing uRTCLib LibraryIt takes a lot of effort to communicate with an RTC module. Fortunately, the uRTCLib library was created to hide all of the complexities, allowing us to issue simple commands to read the RTC data.It is a simple yet powerful library that also supports time-of-day alarms and programming the SQW output, which is not supported by many RTC libraries.To install the library, navigate to Sketch > Include Library > Manage Libraries… Wait for the Library Manager to download the library index and update the list of installed libraries.Filter your search by entering ‘urtclib’. Look for uRTCLib by Naguissa. Click on that entry and then choose Install.At the end of the tutorial, we’ve also included code for reading and writing the onboard 24C32 EEPROM. If you’re interested, you’ll need to install the uEEPROMLib library. Look for ‘ueepromlib‘ and install it as well.Arduino Code – Reading Date, Time and TemperatureThis is a simple sketch for setting/reading the date, time, and temperature from the DS3231 RTC module.#include "Arduino.h"#include "uRTCLib.h"// uRTCLib rtc;uRTCLib rtc(0x68);char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};void setup() { Serial.begin(9600); delay(3000); // wait for console opening URTCLIB_WIRE.begin(); // Comment out below line once you set the date & time. // Following line sets the RTC with an explicit date & time // for example to set January 13 2022 at 12:56 you would call: rtc.set(0, 56, 12, 5, 13, 1, 22); // rtc.set(second, minute, hour, dayOfWeek, dayOfMonth, month, year) // set day of week (1=Sunday, 7=Saturday)}void loop() { rtc.refresh(); Serial.print("Current Date & Time: "); Serial.print(rtc.year()); Serial.print('/'); Serial.print(rtc.month()); Serial.print('/'); Serial.print(rtc.day()); Serial.print(" ("); Serial.print(daysOfTheWeek[rtc.dayOfWeek()-1]); Serial.print(") "); Serial.print(rtc.hour()); Serial.print(':'); Serial.print(rtc.minute()); Serial.print(':'); Serial.println(rtc.second()); Serial.print("Temperature: "); Serial.print(rtc.temp() / 100); Serial.print("\xC2\xB0"); //shows The germ for this post came from a Facebook post I saw. The question was posed: Is it possible to retrieve the day of the week in a CL program? Multiple people suggested using a CEE API. Then came a reply that really interested me. This person said he had built a SQL View for this purpose.It struck me as a creative approach to this scenario. SQL has a global variable CURRENT_DATE which contains, as the name suggests, the current date:SELECT CURRENT_DATE FROM SYSIBM.SYSDUMMY100001----------2020-10-28What kind of information would I want to know about today's date?Day of the week (Wednesday)Month name (October)The full date (Wednesday October 28, 2020)Day of the month (28)Year (2020)Day of the year (302)Quarter (4)Month number (10)Week of the year (44)Day of the week number (4)I know that some of the above information could be retrieved from system values. I will explain why I am including this information in the view later in this post.I am going to show the source code for this view in two parts. Below is the first part, the definition of the columns:01 CREATE OR REPLACE VIEW MYLIB.CL_DATE_NAMES02 FOR SYSTEM NAME "CLDATENAME"03 AS04 (SELECT CAST(UPPER(DAYNAME(CURRENT_DATE)) AS CHAR(9)) 05 AS DAYOFWEEK,06 CAST(DAYOFMONTH(CURRENT_DATE) AS DEC(2,0)) 07 AS DAYOFMONTH,08 CAST(UPPER(MONTHNAME(CURRENT_DATE)) AS CHAR(9)) 09 AS MONTHNAME,10 CAST(YEAR(CURRENT_DATE) AS DEC(4,0)) AS YEAR,11 CAST(RTRIM(UPPER(DAYNAME(CURRENT_DATE))) || ' ' ||12 RTRIM(UPPER(MONTHNAME(CURRENT_DATE))) || ' ' ||13 VARCHAR_FORMAT(DAYOFMONTH(CURRENT_DATE)) || ', ' ||14 VARCHAR_FORMAT(YEAR(CURRENT_DATE)) AS CHAR(28))15 AS FULLDATE,16 CAST(EXTRACT(DOY FROM CURRENT_DATE) AS DEC(3,0)) 17 AS DAYOFYEAR,18 CAST(EXTRACT(QUARTER FROM CURRENT_DATE) AS NUM(1,0)) 19 AS QUARTER,20DayOfWeek of() method in Java with Examples
Group.$stdDevPopReturns the population standard deviation of the input values.$stdDevSampReturns the sample standard deviation of the input values.$sumReturns a sum of numerical values. Ignores non-numeric values.Some operators that are available as accumulators for the$group stage are also available for use in other stages butnot as accumulators. When used in these other stages, these operatorsdo not maintain their state and can take as input either a singleargument or multiple arguments. For details, refer to the specificoperator page.Changed in version 3.2.The following accumulator operators are also available in the$project, $addFields, and $set stages.NameDescription$avgReturns an average of the specified expression or list ofexpressions for each document. Ignores non-numeric values.$firstReturns a value from the first document for each group. Orderis only defined if the documents are in a defined order.$lastReturns a value from the last document for each group. Orderis only defined if the documents are in a defined order.$maxReturns the maximum of the specified expression or list ofexpressions for each document$minReturns the minimum of the specified expression or list ofexpressions for each document$stdDevPopReturns the population standard deviation of the input values.$stdDevSampReturns the sample standard deviation of the input values.$sumReturns a sum of numerical values. Ignores non-numeric values.NameDescription$letDefines variables for use within the scope of a subexpressionand returns the result of the subexpression. Accepts namedparameters.Accepts any number of argument expressions.$abs$accumulator$acos$acosh$add$addToSet$allElementsTrue$and$anyElementTrue$arrayElemAt$arrayToObject$asin$asinh$atan$atan2$atanh$avg$binarySize$bsonSize$ceil$cmp$concat$concatArrays$cond$convert$cos$cosh$dateFromParts$dateFromString$dateToParts$dateToString$dayOfMonth$dayOfWeek$dayOfYear$degreesToRadians$divide$eq$exp$filter$first$floor$function$gt$gte$hour$ifNull$in$indexOfArray$indexOfBytes$indexOfCP$isArray$isNumber$isoDayOfWeek$isoWeek$isoWeekYear$last$let$literal$ln$log$log10$lt$lte$ltrim$map$max$mergeObjects$meta$millisecond$min$minute$mod$month$multiply$ne$not$objectToArray$or$pow$push$radiansToDegrees$range$reduce$regexFind$regexFindAll$regexMatch$replaceOne$replaceAll$reverseArray$round$rtrim$second$setDifference$setEquals$setIntersection$setIsSubset$setUnion$sin$sinh$size$slice$split$sqrt$stdDevPop$stdDevSamp$strLenBytes$strLenCP$strcasecmp$substr$substrBytes$substrCP$subtract$sum$switch$tan$tanh$toBool$toDate$toDecimal$toDouble$toInt$toLong$toLower$toObjectId$toString$toUpper$trim$trunc$type$week$year$zipDAYOFWEEK() Function in MySQL - GeeksforGeeks
It uses the device's time zone.We strongly recommend using timeZoneName prop instead; this prop has known issues in the android implementation (eg. #528).This prop will be removed in a future release.">// GMT+1RNDateTimePicker timeZoneOffsetInMinutes={60} />timeZoneOffsetInSeconds (optional, Windows only)Allows changing of the time zone of the date picker. By default, it uses the device's time zone.">// UTC+1RNDateTimePicker timeZoneOffsetInSeconds={3600} />dayOfWeekFormat (optional, Windows only)Sets the display format for the day of the week headers.Reference: dayOfWeekFormat={'{dayofweek.abbreviated(2)}'} />dateFormat (optional, Windows only)Sets the display format for the date value in the picker's text box.Reference: dateFormat="dayofweek day month" />firstDayOfWeek (optional, Android and Windows only)Indicates which day is shown as the first day of the week.// The native parameter type is an enum defined in defined - meaning an integer needs to passed here (DAY_OF_WEEK).">RNDateTimePicker firstDayOfWeek={DAY_OF_WEEK.Wednesday} />// The native parameter type is an enum defined in defined - meaning an integer needs to passed here (DAY_OF_WEEK).textColor (optional, iOS only)Allows changing of the textColor of the date picker. Has effect only when display is "spinner".">RNDateTimePicker textColor="red" />accentColor (optional, iOS only)Allows changing the accentColor (tintColor) of the date picker.Has no effect when display is "spinner".themeVariant (optional, iOS only)Allows overriding system theme variant (dark or light mode) used by the date picker.However, we recommend that you instead control the theme of the whole application using react-native-theme-control.⚠️ Has effect only on iOS 14 and later. On iOS 13 & less, use textColor to make the picker dark-theme compatibleList of possible values:"light""dark"">RNDateTimePicker themeVariant="light" />locale (optional, iOS only)Allows changing the locale of the component. This affects the displayed text and the date / time formatting. By default, the device's locale is used. Please note using this prop is discouraged due to not working reliably in all picker modes.Prefer localization as documented in Localization note.">RNDateTimePicker locale="es-ES" />is24Hour (optional, Windows and Android only)Allows changing of the time picker to a 24-hour format. By default, this value is decided automatically based on the locale and other preferences.">RNDateTimePicker is24Hour={true} />initialInputMode (optional, Android only)⚠️ Has effect only when design is "material". Allows setting the initial input mode of the picker.List of possible values:"default" - Recommended. Date pickers will show the. Download DayOfWeek Widget [NL] ดาวน์โหลด DayOfWeek Widget [TH] Descargar DayOfWeek Widget [ES] Scarica DayOfWeek Widget [IT] Pobierz DayOfWeek Widget [PL] DayOfWeek Widget for WordPress. Free. In English; V 2.10; 4DAYOFWEEK() Examples – MySQL - Database.Guide
Schema Markup also termed microdata or structured data is a small piece of code that is embedded into the HTML of the web pages, helping search engines to read and classify data quickly and accurately. The ideal benefit of adding schema is to provide the data in terms of who’s, what’s, where’s, when’s, and how’s to the search engine.In laymen’s, schema converts unstructured data into structured data which helps search engines to understand the content, context, enhance the organic rankings, and visibility of the web page in SERP (showing most relevant results, based on the search query)Based on website frameworks and compatibility, there are only 3 types of Schema Code Languages that can be used to add schema markup to the web pages. JSON-LD: JavaScript Object Notation for Linked Data* (Recommended by Google)JSON-LD is a combined version of code and schema markup and it can be implemented anywhere in the HTML body of the webpage. As per Google, this markup is not interleaved with the user-visible text, which makes nested data items easier to express, such as the Country of a PostalAddress of a MusicVenue of an Event. Also, Google can read JSON-LD data when it is dynamically injected into the page’s contents, such as by JavaScript code or embedded widgets in your content management system. A few commonly used JSON-LD attributes are @context, @type, etc.JSON-LD Code Example:{ “@context”: “ “Local Business”,“name”: “Company Name“,“url”: “company URL“,“image”: “Logo URL“,“address”: {“@type”: “PostalAddress”,“streetAddress”: “street address“,“addressLocality”: “Locale area name“,“postalCode”: “xxxxxx“,“addressCountry”: “country code”},“OpeningHoursSpecification”: {“dayOfWeek”: [“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”,“Saturday”],“opens”: “00:00”,“closes”: “00:00”}}DID YOU KNOW?Based on experts’ opinions, Google, which covers 92.24% of the market share for search engines, prefers JSON-LD wherever possible as it is effectively comprehensible and can be added and eliminated without any significant development effortsAs per Google, it is recommended to add JSON-LD schema code in the section of the HTML; however, it can be placed in the section as well.MicrodataMicrodata is one form of structured data that works with HTML5. They are simpler to utilize however can get confusing as they should be implemented with each HTML tag inside the body of the web page.A fewComments
Null) { zipCode = 98052; } if (dayOfWeek === null) { dayOfWeek = "Wednesday"; } // Get weather report for specified zipCode and dayOfWeek. // ...}/** * Gets a weather report for a specified zipCode and dayOfWeek * @customfunction * @param zipCode Zip code. If omitted, zipCode = 98052. * @param [dayOfWeek] Day of the week. If omitted, dayOfWeek = Wednesday. * @returns Weather report for the day of the week in that zip code. */function getWeatherReport(zipCode?: number, dayOfWeek?: string): string { if (zipCode === null) { zipCode = 98052; } if (dayOfWeek === null) { dayOfWeek = "Wednesday"; } // Get weather report for specified zipCode and dayOfWeek. // ...}Range parametersYour custom function may accept a range of cell data as an input parameter. A function can also return a range of data. Excel will pass a range of cell data as a two-dimensional array.For example, suppose that your function returns the second highest value from a range of numbers stored in Excel. The following function accepts the parameter values, and the JSDOC syntax number[][] sets the parameter's dimensionality property to matrix in the JSON metadata for this function./** * Returns the second highest value in a matrixed range of values. * @customfunction * @param {number[][]} values Multiple ranges of values. */function secondHighest(values) { let highest = values[0][0], secondHighest = values[0][0]; for (let i = 0; i = highest) { secondHighest = highest; highest = values[i][j]; } else if (values[i][j] >= secondHighest) { secondHighest = values[i][j]; } } } return secondHighest;}Repeating parametersA repeating parameter allows a user to enter a series of optional arguments to a function. When the function is called, the values are provided in an array for the parameter. If the parameter name ends with a number, each argument's number will increase incrementally, such as ADD(number1, [number2], [number3],…). This matches the convention used for built-in Excel functions.The following function sums the total of numbers, cell addresses, as well as ranges, if entered./*** The sum of all of the numbers.* @customfunction* @param operands A number (such as 1 or 3.1415), a cell address (such as A1 or $E$11), or a range of cell addresses (such as B3:F12)*/function ADD(operands: number[][][]): number { let total: number = 0; operands.forEach(range => { range.forEach(row => { row.forEach(num => { total += num; }); }); }); return total;}This function shows =CONTOSO.ADD([operands], [operands]...) in the Excel workbook.Repeating single value parameterA repeating single value parameter allows multiple single values to be passed. For example, the user could enter ADD(1,B2,3). The following sample shows how to declare a single value parameter./** * @customfunction * @param {number[]} singleValue An array of numbers that are repeating parameters. */function addSingleValue(singleValue) { let total = 0; singleValue.forEach(value => {
2025-04-10Skip to main content This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Custom functions parameter options Article07/05/2023 In this article -->Custom functions are configurable with many different parameter options.ImportantNote that Excel custom functions are available on the following platforms.Office on the webOffice on WindowsMicrosoft 365 subscriptionretail perpetual Office 2016 and latervolume-licensed perpetual Office 2021 and laterOffice on MacExcel custom functions aren't currently supported in the following:Office on iPadvolume-licensed perpetual versions of Office 2019 or earlier on WindowsNoteThe unified manifest for Microsoft 365 doesn't currently support custom functions projects. You must use the add-in only manifest for custom functions projects. For more information, see Office Add-ins manifest.Optional parametersWhen a user invokes a function in Excel, optional parameters appear in brackets. In the following sample, the add function can optionally add a third number. This function appears as =CONTOSO.ADD(first, second, [third]) in Excel.JavaScriptTypeScript/** * Calculates the sum of the specified numbers * @customfunction * @param {number} first First number. * @param {number} second Second number. * @param {number} [third] Third number to add. If omitted, third = 0. * @returns {number} The sum of the numbers. */function add(first, second, third) { if (third === null) { third = 0; } return first + second + third;}/** * Calculates the sum of the specified numbers * @customfunction * @param first First number. * @param second Second number. * @param [third] Third number to add. If omitted, third = 0. * @returns The sum of the numbers. */function add(first: number, second: number, third?: number): number { if (third === null) { third = 0; } return first + second + third;}NoteWhen no value is specified for an optional parameter, Excel assigns it the value null. This means default-initialized parameters in TypeScript will not work as expected. Don't use the syntax function add(first:number, second:number, third=0):number because it will not initialize third to 0. Instead use the TypeScript syntax as shown in the previous example.When you define a function that contains one or more optional parameters, specify what happens when the optional parameters are null. In the following example, zipCode and dayOfWeek are both optional parameters for the getWeatherReport function. If the zipCode parameter is null, the default value is set to 98052. If the dayOfWeek parameter is null, it's set to Wednesday.JavaScriptTypeScript/** * Gets a weather report for a specified zipCode and dayOfWeek * @customfunction * @param {number} [zipCode] Zip code. If omitted, zipCode = 98052. * @param {string} [dayOfWeek] Day of the week. If omitted, dayOfWeek = Wednesday. * @returns {string} Weather report for the day of the week in that zip code. */function getWeatherReport(zipCode, dayOfWeek) { if (zipCode ===
2025-04-18I am using the Extract function to extract the day of the year.Lines 18 and 19: Extracting quarter and casting to a numeric/signed column.Lines 20 and 21: Extracting month number.Lines 22 and 23: Extracting week number.Lines 24 and 25: I decided having the day of week as a number in the View would could be useful. The week starts on Sunday so it is day number 1. I am casting this single digit number to numeric in the view.Line 26: Here is where I give the name of the dummy file.The rest of the code for the View looks like:27 LABEL ON COLUMN CL_DATE_NAMES (28 DAYOFWEEK IS 'Day of week',29 DAYOFMONTH IS 'Day of month',30 MONTHNAME IS 'Month name',31 YEAR IS 'Year',32 FULLDATE IS 'Full date',33 DAYOFYEAR IS 'Day of year',34 QUARTER IS 'Qtr of year',35 MONTHNBR IS 'Month',36 WEEK IS 'Week of year',37 DOWNBR IS 'Day of week as No.') ;38 LABEL ON COLUMN CL_DATE_NAMES (39 DAYOFWEEK TEXT IS 'Day of week',40 DAYOFMONTH TEXT IS 'Day of month',41 MONTHNAME TEXT IS 'Month name',42 YEAR TEXT IS 'Year',43 FULLDATE TEXT IS 'Full date',44 DAYOFYEAR TEXT IS 'Day of year',45 QUARTER TEXT IS 'Quarter of year',46 MONTHNBR TEXT IS 'Month',47 WEEK TEXT IS 'Week of year',48 DOWNBR TEXT IS 'Day of week as number') ;49 LABEL ON TABLE CL_DATE_NAMES IS 'CL_DATE_NAMES' ;Lines 27 – 37: Here I am giving all the columns their column descriptions/headings.Lines 38 – 48: And here the descriptions for the columns.Line 49: Lastly I am giving this
2025-04-03Also referred to as A5 (SCL) and A4 (SDA).The following table lists the pin connections:The diagram below shows how to connect everything.Installing uRTCLib LibraryIt takes a lot of effort to communicate with an RTC module. Fortunately, the uRTCLib library was created to hide all of the complexities, allowing us to issue simple commands to read the RTC data.It is a simple yet powerful library that also supports time-of-day alarms and programming the SQW output, which is not supported by many RTC libraries.To install the library, navigate to Sketch > Include Library > Manage Libraries… Wait for the Library Manager to download the library index and update the list of installed libraries.Filter your search by entering ‘urtclib’. Look for uRTCLib by Naguissa. Click on that entry and then choose Install.At the end of the tutorial, we’ve also included code for reading and writing the onboard 24C32 EEPROM. If you’re interested, you’ll need to install the uEEPROMLib library. Look for ‘ueepromlib‘ and install it as well.Arduino Code – Reading Date, Time and TemperatureThis is a simple sketch for setting/reading the date, time, and temperature from the DS3231 RTC module.#include "Arduino.h"#include "uRTCLib.h"// uRTCLib rtc;uRTCLib rtc(0x68);char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};void setup() { Serial.begin(9600); delay(3000); // wait for console opening URTCLIB_WIRE.begin(); // Comment out below line once you set the date & time. // Following line sets the RTC with an explicit date & time // for example to set January 13 2022 at 12:56 you would call: rtc.set(0, 56, 12, 5, 13, 1, 22); // rtc.set(second, minute, hour, dayOfWeek, dayOfMonth, month, year) // set day of week (1=Sunday, 7=Saturday)}void loop() { rtc.refresh(); Serial.print("Current Date & Time: "); Serial.print(rtc.year()); Serial.print('/'); Serial.print(rtc.month()); Serial.print('/'); Serial.print(rtc.day()); Serial.print(" ("); Serial.print(daysOfTheWeek[rtc.dayOfWeek()-1]); Serial.print(") "); Serial.print(rtc.hour()); Serial.print(':'); Serial.print(rtc.minute()); Serial.print(':'); Serial.println(rtc.second()); Serial.print("Temperature: "); Serial.print(rtc.temp() / 100); Serial.print("\xC2\xB0"); //shows
2025-03-25The germ for this post came from a Facebook post I saw. The question was posed: Is it possible to retrieve the day of the week in a CL program? Multiple people suggested using a CEE API. Then came a reply that really interested me. This person said he had built a SQL View for this purpose.It struck me as a creative approach to this scenario. SQL has a global variable CURRENT_DATE which contains, as the name suggests, the current date:SELECT CURRENT_DATE FROM SYSIBM.SYSDUMMY100001----------2020-10-28What kind of information would I want to know about today's date?Day of the week (Wednesday)Month name (October)The full date (Wednesday October 28, 2020)Day of the month (28)Year (2020)Day of the year (302)Quarter (4)Month number (10)Week of the year (44)Day of the week number (4)I know that some of the above information could be retrieved from system values. I will explain why I am including this information in the view later in this post.I am going to show the source code for this view in two parts. Below is the first part, the definition of the columns:01 CREATE OR REPLACE VIEW MYLIB.CL_DATE_NAMES02 FOR SYSTEM NAME "CLDATENAME"03 AS04 (SELECT CAST(UPPER(DAYNAME(CURRENT_DATE)) AS CHAR(9)) 05 AS DAYOFWEEK,06 CAST(DAYOFMONTH(CURRENT_DATE) AS DEC(2,0)) 07 AS DAYOFMONTH,08 CAST(UPPER(MONTHNAME(CURRENT_DATE)) AS CHAR(9)) 09 AS MONTHNAME,10 CAST(YEAR(CURRENT_DATE) AS DEC(4,0)) AS YEAR,11 CAST(RTRIM(UPPER(DAYNAME(CURRENT_DATE))) || ' ' ||12 RTRIM(UPPER(MONTHNAME(CURRENT_DATE))) || ' ' ||13 VARCHAR_FORMAT(DAYOFMONTH(CURRENT_DATE)) || ', ' ||14 VARCHAR_FORMAT(YEAR(CURRENT_DATE)) AS CHAR(28))15 AS FULLDATE,16 CAST(EXTRACT(DOY FROM CURRENT_DATE) AS DEC(3,0)) 17 AS DAYOFYEAR,18 CAST(EXTRACT(QUARTER FROM CURRENT_DATE) AS NUM(1,0)) 19 AS QUARTER,20
2025-04-02Group.$stdDevPopReturns the population standard deviation of the input values.$stdDevSampReturns the sample standard deviation of the input values.$sumReturns a sum of numerical values. Ignores non-numeric values.Some operators that are available as accumulators for the$group stage are also available for use in other stages butnot as accumulators. When used in these other stages, these operatorsdo not maintain their state and can take as input either a singleargument or multiple arguments. For details, refer to the specificoperator page.Changed in version 3.2.The following accumulator operators are also available in the$project, $addFields, and $set stages.NameDescription$avgReturns an average of the specified expression or list ofexpressions for each document. Ignores non-numeric values.$firstReturns a value from the first document for each group. Orderis only defined if the documents are in a defined order.$lastReturns a value from the last document for each group. Orderis only defined if the documents are in a defined order.$maxReturns the maximum of the specified expression or list ofexpressions for each document$minReturns the minimum of the specified expression or list ofexpressions for each document$stdDevPopReturns the population standard deviation of the input values.$stdDevSampReturns the sample standard deviation of the input values.$sumReturns a sum of numerical values. Ignores non-numeric values.NameDescription$letDefines variables for use within the scope of a subexpressionand returns the result of the subexpression. Accepts namedparameters.Accepts any number of argument expressions.$abs$accumulator$acos$acosh$add$addToSet$allElementsTrue$and$anyElementTrue$arrayElemAt$arrayToObject$asin$asinh$atan$atan2$atanh$avg$binarySize$bsonSize$ceil$cmp$concat$concatArrays$cond$convert$cos$cosh$dateFromParts$dateFromString$dateToParts$dateToString$dayOfMonth$dayOfWeek$dayOfYear$degreesToRadians$divide$eq$exp$filter$first$floor$function$gt$gte$hour$ifNull$in$indexOfArray$indexOfBytes$indexOfCP$isArray$isNumber$isoDayOfWeek$isoWeek$isoWeekYear$last$let$literal$ln$log$log10$lt$lte$ltrim$map$max$mergeObjects$meta$millisecond$min$minute$mod$month$multiply$ne$not$objectToArray$or$pow$push$radiansToDegrees$range$reduce$regexFind$regexFindAll$regexMatch$replaceOne$replaceAll$reverseArray$round$rtrim$second$setDifference$setEquals$setIntersection$setIsSubset$setUnion$sin$sinh$size$slice$split$sqrt$stdDevPop$stdDevSamp$strLenBytes$strLenCP$strcasecmp$substr$substrBytes$substrCP$subtract$sum$switch$tan$tanh$toBool$toDate$toDecimal$toDouble$toInt$toLong$toLower$toObjectId$toString$toUpper$trim$trunc$type$week$year$zip
2025-04-13