Giter Club home page Giter Club logo

kotlin's Introduction

Personnummer

GitHub Workflow Status

Validate Swedish personal identity numbers with Kotlin. Heavily inspired by the Java implementation by @Johannestegner, thank you!

Example

import personnummer.Personnummer

fun main(args: Array<String>) {
    Personnummer.valid(8507099805L)     // => true
    Personnummer.valid("198507099805")  // => true
}

More examples in the src/test/kotlin/PersonnummerTest.kt.

Linting

This code is linted with ktlint. See ktlint documentation for details.

License

MIT

kotlin's People

Contributors

bombsimon avatar frozzare avatar johannestegner avatar rasmusbe avatar renovate-bot avatar renovate[bot] avatar ullenius avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

kotlin's Issues

Add coordination number flag

We need a flag on the ::Valid method making it possible to turn of validation for coordination number (+60 on day). The flag should default to enabling them as that is how it is currently working.

See personnummer/meta#9 for meta discussion.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/test.yml
  • actions/checkout v4
  • actions/setup-java v4
gradle
settings.gradle.kts
build.gradle.kts
  • org.jetbrains.kotlin.jvm 1.9.24
  • org.jetbrains.kotlin.plugin.serialization 1.9.24
  • org.jlleitschuh.gradle.ktlint 11.6.1
  • org.jetbrains.kotlinx:kotlinx-serialization-json 1.6.3
gradle-wrapper
gradle/wrapper/gradle-wrapper.properties
  • gradle 8.7

  • Check this box to trigger a request for Renovate to run again on this repository

v3

Todo:

  • Follow version 2
  • Follow version 3
  • Modify package to use functions direct under package namespace instead of class. Version 3 have a parse method that can be useful.

Spec: https://github.com/personnummer/meta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.