Online Swift Compiler

var mytime = Date() var myCalendar = Calendar.current var currentMonth = myCalendar.component(.month, from: mytime) print(currentMonth)


If your code takes user input, put it here. For multiple inputs, one per line

Run your code online with this amazing online playground tool for Swift. Just put your code and click on the "Run Code" button.

Using our online Swift compiler tool, you can execute Swift code here online. This tool will help you to start learning Swift without installing it on your machine.

This tool will also help you to make it easier to practice and increase your programming skill in Swift programming language.

  • Read our Swift tutorials
  • Many programmers and developers may find testing simple code on their machine every time is a heavy wait task. So we are presenting this online compiler to you. Happy coding...!

    How is Swift used?

    Swift is a programming language that is developed by the company Apple Inc to make it easier for app development for their devices. This language is widely used by iOS and iPad app developer. Most of the Apple developer prefer to use Swift over Objective-C language.

    Though desktop app for Apple can be developed by Objective-C and many other general purpose languages. But most of the developers prefer Swift for desktop app development for Apple.