Trying to get date format in Google Sheets to display as 1st, 2nd, 3rd etc with the relevant suffix using google scripts editor

I am trying to get the date format currently displaying as Monday 25 @ 7:30 PM but I would like it to display showing the relevant suffix i.e. ‘th’ or ‘st’ or ‘nd’ i.e. 4th, 1st, 2nd etc.

I am using the code below but getting the error message “Exception: Invalid argument: date. Should be of type: Date” any ideas? Much apprecitated

 function getOrdinal(date) {
    var d = new Date(),
    suffix = ('th', 'st', 'nd', 'rd')((d > 3 && d < 21) || d % 10 > 3 ? 0 : d % 10);

return Utilities.formatDate(date, Session.getScriptTimeZone(), "d'" + suffix + "MMMM, yyyy");
}

Member search | Nulled Scripts Download

Premium upgrade:

This XF2 add-on along with the entire collection can be purchased for $25.00 USD. Your Premium upgrade will allow you to download as many XF2 add-ons as you like for one year. Please see the entire collection located in the Resources area at this URL:

https://www.xf2addons.com/

Note: all my XF1 add-ons are still 100% free and are supported by donations.

Description:

Search for members.

Search up to six input fields:

  1. Username…

.

Nexelit – Multipurpose Website & Business Management System CMS | Nulled Scripts Download

Nexelit Multipurpose Website & Agency Business CMS is the perfect agency business or any kind of website with this PHP Script. Nexelit is a better way to present your business, corporate website, construction website, interior, agency, events, event ticket selling, donation website, crowdfunding, fund rising, job posting, manage your customer, quotation, clients feedback, product selling, digital product selling, physical product…

.

WHMCS 8.1 Nulled | Nulled Scripts Download

System Requirements​

Most current web servers* with PHP & MySQL installed will be capable of running WHMCS.
The following table shows the minimum and recommended system requirements for running WHMCS 8.0 and later.
Looking for the requirements for the earlier WHMCS 7.5 – 7.10 versions…

.

Request: html5 chat

With flash now dead and unsecure. I am in need a of a new chat system for a website. Looking to see if anyone has the html 5 chat script from the following site.

Looking to run the script on my own server. Thanks in advance

.

Calling javascript in javascript works for some but not all scripts

The script loading is asyncronous, so when hljs.initHighlightingOnLoad() is called the scripts are not loaded yet.

Alternative 1

You can modify your loadScript() function to make it work with promises, which resolve when the script is loaded (taken from here):

function loadScript(url) {    
    return new Promise(function(resolve, reject) {
        var script = document.createElement("script");
        script.onload = resolve;
        script.onerror = reject;
        script.src = url;
        document.getElementsByTagName("head")(0).appendChild(script);
    });
}

Now you can call your code and be sure that all libraries are loaded before calling hljs.initHighlightingOnLoad():

(async function init() {
  await loadScript('https://polyfill.io/v3/polyfill.min.js?features=es6');
  await loadScript('https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js')
  await loadScript('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js')
  
  hljs.initHighlightingOnLoad();
})()

Alternative 2

You can modify your loadScript() function to make it load the scripts using defer and add an optional onload handler that you can use to call hljs.initHighlightingOnLoad():

function loadScript(url, onload)
{    
    var head = document.getElementsByTagName('head')(0);
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = url;
    script.async = false;
    script.onload = onload;
    head.appendChild(script);
}

loadScript('https://polyfill.io/v3/polyfill.min.js?features=es6')
loadScript('https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js')
loadScript('https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js', () => {hljs.initHighlightingOnLoad()})

Asterisk VoIP Center | Nulled Scripts Download

Asterisk VoIP Center For WHMCS is an expanded module that allows you to integrate Asterisk server with your WHMCS. Owing to such a connection you will be able to easily monitor, replay and originate all the VoIP calls without leaving your WHMCS admin area!

The module offers convenient supervising of all Asterisk VoIP calls including detailed listing of calls with filtering, configuration of extensions and call in/out popup templates, and management of access control list….

.

1 of n Multisig Scriptless Scripts?

I know MuSig makes n of n multisig scriptless. However, can we also aggregate multiple internal public keys in one public key, and unlock funds using either one of the internal public keys?

Social Engine 5.3.3 Nulled | Nulled Scripts Download

We are happy to announce the release of SocialEngine PHP 5.3.3! This pre-Thanksgiving celebration release adds a few small improvements and fixes bugs. We are truly thankful for all of you and wish for a safe and happy holiday! As a reminder, our terrific 15% discount is still available! Get it while it’s HOT!!

Following is a list of fixes in this release:

Bugs Fixes and Improvements:​

  • Improved – Dark mode pagination in forum.
  • Improved – Removed…

.

Anchor

Admin submitted a new resource:

Anchor – Anchor BB code media sites.

Description:

Anchor BB code media sites.

This add-on is used to automatically embed Anchor podcasts.

How to use:

  1. Go to Anchor podcast page
  2. Click Share
  3. Copy URL
  4. Go to your forum
  5. Paste URL into post
  6. Save

Read more…

Read more

.