Skip to content

Instantly share code, notes, and snippets.

@beygi
Last active May 14, 2019 13:14
Show Gist options
  • Select an option

  • Save beygi/e0c38acee82277e28b663b8eef0a2a91 to your computer and use it in GitHub Desktop.

Select an option

Save beygi/e0c38acee82277e28b663b8eef0a2a91 to your computer and use it in GitHub Desktop.

Revisions

  1. beygi revised this gist May 14, 2019. No changes.
  2. beygi revised this gist May 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    c=(s)=>s.replace(/\d/g,x=>"۰۱۲۳۴۵۶۷۸۹".split("")[x]);
    ```

    **usage:**
    **Usage:**

    ```
    console.log(c("2003/08/12")); //۲۰۰۳/۰۸/۱۲
  3. beygi revised this gist May 14, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -6,5 +6,5 @@ c=(s)=>s.replace(/\d/g,x=>"۰۱۲۳۴۵۶۷۸۹".split("")[x]);
    **usage:**

    ```
    console.log(c("2003/12/12"));
    console.log(c("2003/08/12")); //۲۰۰۳/۰۸/۱۲
    ```
  4. beygi revised this gist May 14, 2019. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    defining
    **Definition**
    ```
    c=(s)=>s.replace(/\d/g,x=>"۰۱۲۳۴۵۶۷۸۹".split("")[x]);
    ```

    usage:
    **usage:**

    ```
    console.log(c("2003/12/12"));
  5. beygi created this gist May 14, 2019.
    10 changes: 10 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    defining
    ```
    c=(s)=>s.replace(/\d/g,x=>"۰۱۲۳۴۵۶۷۸۹".split("")[x]);
    ```

    usage:

    ```
    console.log(c("2003/12/12"));
    ```