cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              @import url('https://fonts.googleapis.com/css?family=Lalezar');
body {
  background-color: #f6f6f6;
  color: #333;
  font-family: 'Lalezar', tahoma, Arial, sans-serif;
  line-height: 1.42857;
}
#demo {
  direction: rtl;
  text-align: center;
  margin: 2em 0;
}
            
          
!
            
              var sundte = new Date
var yeardte = sundte.getFullYear();
var monthdte = sundte.getMonth();
var dtedte = sundte.getDate();
var daydte = sundte.getDay();
var sunyear
switch (daydte) {
    case 0:
        var today = "يکشنبه";
        break;
    case 1:
        var today = "دوشنبه";
        break;
    case 2:
        var today = "سه شنبه";
        break;
    case 3:
        var today = "چهارشنبه";
        break;
    case 4:
        var today = "پنچشنبه";
        break;
    case 5:
        var today = "جمعه";
        break;
    case 6:
        var today = "شنبه";
        break;
}
switch (monthdte) {
    case 0:

        sunyear = yeardte - 622;
        if (dtedte <= 20) {
            var sunmonth = "دي";
            var daysun = dtedte + 10;
        } else {
            var sunmonth = "بهمن";
            var daysun = dtedte - 20;
        }
        break;
    case 1:

        sunyear = yeardte - 622;
        if (dtedte <= 19) {
            var sunmonth = "بهمن";
            var daysun = dtedte + 11;
        } else {
            var sunmonth = "اسفند";
            var daysun = dtedte - 19;
        }
        break;
    case 2:
        {
            if ((yeardte - 621) % 4 == 0)
                var i = 10;
            else
                var i = 9;
            if (dtedte <= 20) {
                sunyear = yeardte - 622;
                var sunmonth = "اسفند";
                var daysun = dtedte + i;
            } else {
                sunyear = yeardte - 621;
                var sunmonth = "فروردين";
                var daysun = dtedte - 20;
            }
        }
        break;
    case 3:

        sunyear = yeardte - 621;
        if (dtedte <= 20) {
            var sunmonth = "فروردين";
            var daysun = dtedte + 11;
        } else {
            var sunmonth = "ارديبهشت";
            var daysun = dtedte - 20;
        }
        break;
    case 4:

        sunyear = yeardte - 621;
        if (dtedte <= 21) {
            var sunmonth = "ارديبهشت";
            var daysun = dtedte + 10;
        } else {
            var sunmonth = "خرداد";
            var daysun = dtedte - 21;
        }

        break;
    case 5:

        sunyear = yeardte - 621;
        if (dtedte <= 21) {
            var sunmonth = "خرداد";
            var daysun = dtedte + 10;
        } else {
            var sunmonth = "تير";
            var daysun = dtedte - 21;
        }
        break;
    case 6:

        sunyear = yeardte - 621;
        if (dtedte <= 22) {
            var sunmonth = "تير";
            var daysun = dtedte + 9;
        } else {
            var sunmonth = "مرداد";
            var daysun = dtedte - 22;
        }
        break;
    case 7:

        sunyear = yeardte - 621;
        if (dtedte <= 22) {
            var sunmonth = "مرداد";
            var daysun = dtedte + 9;
        } else {
            var sunmonth = "شهريور";
            var daysun = dtedte - 22;
        }
        break;
    case 8:

        sunyear = yeardte - 621;
        if (dtedte <= 22) {
            var sunmonth = "شهريور";
            var daysun = dtedte + 9;
        } else {
            var sunmonth = "مهر";
            var daysun = dtedte + 22;
        }
        break;
    case 9:

        sunyear = yeardte - 621;
        if (dtedte <= 22) {
            var sunmonth = "مهر";
            var daysun = dtedte + 8;
        } else {
            var sunmonth = "آبان";
            var daysun = dtedte - 22;
        }
        break;
    case 10:

        sunyear = yeardte - 621;
        if (dtedte <= 21) {
            var sunmonth = "آبان";
            var daysun = dtedte + 9;
        } else {
            var sunmonth = "آذر";
            var daysun = dtedte - 21;
        }

        break;
    case 11:

        sunyear = yeardte - 621;
        if (dtedte <= 19) {
            var sunmonth = "آذر";
            var daysun = dtedte + 9;
        } else {
            var sunmonth = "دي";
            var daysun = dtedte + 21;
        }
        break;

}
document.getElementById("demo").innerHTML = "امروز "+today+"&nbsp;"+daysun+"&nbsp;"+sunmonth+"&nbsp;"+sunyear+" است";
            
          
!
999px
Loading ..................

Console