Check out example codes for "c# @datetime show only year". It will help you in understanding the concepts better.

Code Example 1

<footer class="border-top footer text-muted">
        <div class="container">
            &copy; @DateTime.UtcNow.Year - Home <a asp-area="" asp-controller="Home" asp-action="Privacy"></a>
        </div>
    </footer>

Learn ReactJs, React Native from akashmittal.com